Search code examples
testingautomated-testscypresse2e-testingtestcafe

Call Cypress Test from TestCafe


One of the projects has automated several test cases in Cypress. We are using TestCafe to Automate our test cases. We want to call some of the test written in Cypress from TestCafe. These Cypress test create precondition data that we can use in TestCafe. These cypress test cases are complicated and perform bunch of actions. Also, it is not responsibility of our project to maintain those scenarios. So, there is no sense to automate these test again in Test Café. It will help us in reusing test cases. We tried various approaches

Schedule specific Pipeline in Cypress with those test cases. Trigger this Pipeline from TestCafe

Is there a better way to call specific Cypress test from TestCafe ?


Solution

  • To me, calling Cypress tests from TestCafe tests seems like less clean a way to do it.

    I'd do it with pipelines as you hinted at in your question:

    1. Run Cypress tests that set up what you need
    2. If 1. succeeds, trigger TestCafe tests

    This looks pretty straigforward to me, and it's perhaps what other people would expect as well, so you make lives of your colleagues easier :)