0

One of our E2E tests involve checking whether the sample apps for our SDKs work properly. To do that, we would just mimick the end user behaviour (download the sample app zip file, unzip it and run npm start) and the tests pass if the server starts in http://localhost:3000.

Now the problem is that while the test suite is running, we cannot run anything on port 3000, as the sample app instances keep getting started and killed for the E2E tests. This brought the following question into my mind.

Is there any way to configure Cypress to open this sample app servers inside a cypress supported sandbox environment, instead of opening in a new tab of one of my working browser windows?

Thanks in Advance.

Pavindu
  • 2,684
  • 6
  • 44
  • 77
  • What tool are you using to start your sample app? Does that have options to change the port to something else? – agoff Oct 31 '22 at 16:53
  • Of course, we can change the port to something other than 3000, but then it would disturb someone who is doing some work using that port while running the test suite. – Pavindu Oct 31 '22 at 18:31
  • The solution I'm looking for is something like a sandboxed OS where the sample apps start independent of the global operating system and browsers. Oh! Docker came into my mind when I was writing this. Should check whether docker + cypress integration would make this possible. – Pavindu Oct 31 '22 at 18:33
  • Use [Docker](https://docs.cypress.io/examples/examples/docker) – Gerhard Funk Oct 31 '22 at 23:50

0 Answers0