Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to run multiple Qase Test Cases in parallel #140

Open
mdiep-asp opened this issue Jul 2, 2024 · 5 comments
Open

Not able to run multiple Qase Test Cases in parallel #140

mdiep-asp opened this issue Jul 2, 2024 · 5 comments
Assignees

Comments

@mdiep-asp
Copy link

Currently, if we try to run multiple Qase Test Cases in parallel (using maven surefire plugin + testng) by splitting all test cases into 3 test suites, we will see this error:

[main] INFO com.app.appium.provider.DeviceProvider - The test device is: cloud_ios
[main] INFO com.app.appium.utilities.AppiumDriverUtils - Activating app
[main] INFO com.app.appium.core.BaseTest - Test: testABC , Result:failed
[main] INFO com.app.appium.utilities.AppiumDriverUtils - Terminating app
[main] INFO com.app.appium.provider.DeviceProvider - The test device is: cloud_ios
[main] INFO com.app.appium.utilities.AppiumDriverUtils - Activating app
[main] ERROR io.qase.api.CasesStorage - Previous case is still in progress.
[main] INFO com.app.appium.core.BaseTest - Test: testDEF , Result:failed
[main] INFO com.app.appium.utilities.AppiumDriverUtils - Terminating app
[main] INFO com.app.appium.provider.DeviceProvider - The test device is: cloud_ios
[main] INFO com.app.appium.utilities.AppiumDriverUtils - Activating app
[main] ERROR io.qase.api.CasesStorage - Previous case is still in progress.
[main] INFO com.app.appium.core.BaseTest - Test: testGHI , Result:failed
[main] INFO com.app.appium.utilities.AppiumDriverUtils - Terminating app

Upon looking into Qase api, we saw this:

Screenshot 2024-07-02 at 2 30 13 PM

Seems like each test case run is associated with a thread. Even though we run the other test suites with a different maven instance, somehow the existing running test case thread from one suite was being called by others and caused this issue.

Wonder Qase actually supports running in parallel? If not, will Qase soon support it? Please help. Thanks

@savkk savkk self-assigned this Jul 3, 2024
@savkk
Copy link
Collaborator

savkk commented Jul 8, 2024

@mdiep-asp Hi! Could you give an example of the parallel running settings that you use?

@mdiep-asp
Copy link
Author

@savkk we ran our mobile automation tests on CircleCI with these configs:

  • We broke the entire test suite into a 3 smaller test suites
  • Each smaller test suite was running on its own distinct workflow of CircleCI
  • We used maven surefire plugin to execute these smaller test suites

We believe that even though there are 3 running distinct workflows. They are still on the same machine, and probably share the same threads pool.

@savkk
Copy link
Collaborator

savkk commented Jul 12, 2024

@mdiep-asp, have you set up parallel run through testng? Could you give an example of testng configuration?

@mdiep-asp
Copy link
Author

@savkk we didn't set up parallel run thru testng. We basically have 3 open terminals, each run with command like this mvn clean test -DtestngXmlFile=$PARAM_TESTNG_XML -DSuiteName=$PARAM_SUITE_NAME in parallel.

@savkk
Copy link
Collaborator

savkk commented Aug 5, 2024

@savkk we didn't set up parallel run thru testng. We basically have 3 open terminals, each run with command like this mvn clean test -DtestngXmlFile=$PARAM_TESTNG_XML -DSuiteName=$PARAM_SUITE_NAME in parallel.

It looks really strange. If you run tests in different processes, they should not affect each other. They have their own memory.
If you run a single process, does this error not appear?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants