SolidJSS
SolidJSโ€ข3y agoโ€ข
1 reply
oneiro

Easiest way to spin up an e2e/integration-test setup with solid-start?

Hey folks,

I am currently trying to figure out what would be a good way to build an integration and e2e-testing setup for solid-start.
Essentially my integration tests should be able to connect to a database and only test server-side logic (for UI stuff I would simply use testing-library). E2E-tests should spin up a database as well as the solid-start application.

Now here are the hurdles I have yet to overcome:

1. I would definitely like to use docker to spin up my database (we use docker-compose for our dev setup anyway). Ideally in conjunction with test containers. However our database connection is currently initalized via environment variables from an
.env
-file and with testcontainers I am unsure how I would ideally overwrite these after our database has been
imported
(this would be necessary, as testcontainers use a random port and I would also need to get the host)
2. What would be the best/easiest way to start my server. Ofcourse I could also run my solid-start app inside another container, but that feels a bit more exessive than I would like. Ideally I could start the server without the need for a container from my tests.

So my general question would probably be: what do your integration/e2e-testsetups generally look like, when working with solid-start?

Thanks in advance ๐Ÿ™‚
Was this page helpful?