0

So I'm currently developing a client/server application in Typescript/NodeJS and I want to add end-to-end testing. However, the documentation of TestCafe (and other e2e frameworks btw.) leave me clueless on what I want to achieve.

What I want to do is some sort of isolation of client/server setups for different tests. I imagine something like this:

  • Set up server environment (e.g. add certain test data, specific for the current test)
  • Set up the client (again, with a test-specific environment)
  • Run the test
  • Clean everything up
  • Rince and repeat with the next test

As far as I understand the documentation, any examples assume the same server environment for all tests. Is anything like the above possible with TestCafe (without implementing too much of this functionality by myself)? Are there other frameworks that are better suited for this kind of tests?

Thanks for your help

Alex Skorkin
  • 4,264
  • 3
  • 25
  • 47
Kc_
  • 201
  • 4
  • 11

1 Answers1

1

TestCafe does not support the capability to set up your server environment, so this should be implemented by a developer. As for Client isolation, TestCafe runs every test in isolated mode. This means that each test run does not depend on the previous test run. In addition, TestCafe runs every single test with clear cookies/storages.

Alex Kamaev
  • 6,198
  • 1
  • 14
  • 29