Absinthe testing poll

Hi everyone,

I am creating this pool to understand why people choose Wormwood and exunit for testing there Absinthe API.
This pool will be different because each choice in the pool will have a short introduction.

ExUnit Absinthe API Testing

In order to test Absinthe Api with Exunit we will need to treat our api as an json api and use http requests using ConnCase.
More info here https://hexdocs.pm/ex_unit/ExUnit.html

Wormwood Absinthe Api Testing
Wormwood will test directly the graphql query and it will not need to use any http request to do so.
More info here https://www.tinfoilsecurity.com/blog/wormwood-graphql-testing

What Absinthe testing framework do you use?

  • ExUnit
  • Wormwood

0 voters

Also please after you vote if you want to explain why you choose one or the other, it would be great.

Thanks

1 Like

I use wormwood because it works even if a new version of absinthe or absinthe plug is coming out(unless they implement breaking changes). So it’s a lot more reliable when you want to have a peace of mind, also the code you write for the test can be reused on the front-end from the gql files.