mvitiuk / serenity-appium-test-example

serenity-appium-test-example
4 stars 1 forks source link

Query: How to run test cases on multiple devices in parallel #3

Open vikramvi opened 8 years ago

vikramvi commented 8 years ago

@mvitiuk I have a physical device and emulator config in individual .json files and both are registered successfully with grid.

I want to run test case in parallel on both of these devices.

Please clarify how to do it ?

I observed the step baseSteps.initialisation("Nexus"); but with this only 1 device gets initialized how to customize it to pick up all the available node devices ?

Thanks & Regards, Vikram

saikrishna321 commented 8 years ago

@mvitiuk i was trying to integrate this framework with AppiumTestDistribution framework to run tests in parallel(https://github.com/saikrishna321/AppiumTestDistribution)

Currently i see this supports Junit, How about testNG ?

Can't we extent Step class to BaseTest which holds the Annotations? https://github.com/mvitiuk/serenity-appium-test-example/blob/master/serenity-appium-grid/src/test/java/myTests/features/BaseStory.java#L28

mvitiuk commented 8 years ago

@vikramvi In general you need to initialise in baseSteps.initialisation("Nexus") other device from base steps, like Samsung S5(Samsung Win), you can add your own, but it also need to be in nodesX.json file and registered in the grid. I had 3 registered devices at time and I don't know the limit.

I have several stories, (lets say 5, each has from 6 to 11 test cases), my goal was to speed up process of running TCs/Stories.

So I had initialisation of the needed device for each story (e.g Login.Story -> Nexus, SendEmail - Samsung S5). And all stories were running at a time in parallel for different devices.

This repo is only an example with one test case :) I can update it with more test cases and devices later, when have time.

mvitiuk commented 8 years ago

@saikrishna321 regarding testNG, I haven't try but I think this could be possible, don't know do Serenity have support of testNG.

Regarding Can't we extent Step class to BaseTest which holds the Annotations? - don't follow, sorry

vikramvi commented 8 years ago

@mvitiuk thanks a ton for detailed clarifications. I will keep the issue open as there is one more comment to be resolved from Sai.

Best Regards, Vikram