https://cypress.io logo
how to parallelize my tests.
# i-need-help
c
I want to run my tests in parallel so as to reduce the time for the build but i am stuck on how to implement it.The tests are dependent on each other.Let's say test 1, test 2, test 3 can execute in a suite (testsuite1) but the test 4, test 5, test 6 of testsuite2 require the testsuite1 to execute first before it.Right now the build takes 8 mins which is quite a long time. I need someone to help me out.
g
Can you make the tests independent?
c
i can but still it would make them redundant
g
then cache data using cypress-data-session to avoid redundant commands
c
bahmutov, I have a doubt
sometimes i see the tests failing because fetch requests fail to execute completely and the result is a blank page.Some of the times i see 504 error.How do i solve this?Please assist.I am eagerly looking for a solution
I am open to learn new courses be it paid or not
g
Well, my courses are at cypress.tips/courses/ but from what you described, there is not enough information to say what you are doing. Are your
fetch
calls failing? Your server not responding?
c
sometimes i get 504 errors and as mentioned sometimes i see a blank page because the fetch requests are not completely processed
g
i cannot say anything without a reproducible example, i would say your server and application seem to be broken and the test shows it happening
c
bahmutov plz see this
g
what is this?
c
the error i see most of the times( a blank page)
g
so you server /backend is sending some blank HTML page instead of Ajax call. Check what you expect to get and what it sends
c
i would rather say there is delay in response so we are seeing the blank screen
maybe reload could help
but because it retrying the test 2 times the second call will fail because it already has made the first attempt (duplicate call)