#dagger for e2e tests

1 messages · Page 1 of 1 (latest)

wise zinc
#

Hello! Yes e2e tests are a common use case.

#

The first step is to decide what native tools you would use for the task. Obviously in your case there's react and nodejs. But perhaps there is a specific test framework, etc. Then search the daggerverse for modules integrating those tools. If one doesn't exist, write a simple module that installs the tool in a container, and runs it. Usually it's a few dozen lines of code for a basic implementation.

#

An important feature for e2e testing is service binding. You can run your test logic in one container, and the service to test (webapp, API..) in another container. Then have dagger execute both, with one exposed to the other as a service.

olive ivy
#

Thanks Solomon! I'm asking this in regards to the Okteto Dagger module which I demoed on the last community call. So Okteto already takes care of deploying the application and giving you endpoints where you can access these. What I was looking for was a Dagger module which can take this output of endpoints and run tests against it. I found the Cypress module but was looking if there were other simpler to set up options as well! I guess I'll try writing a module for some other tool in case none exist.

wise zinc
wise zinc
#

On the backend side, a lot of times e2e ends up being implemented as "regular" tests (eg. go test) then invoked with a glue script to setup dependencies.

#

This might be a good use case for interfaces actually