简体   繁体   中英

Browserstack mix Simple and Parallel tests (java)

I'm using browserstack to run a parallel test. However, this particular test contains two parts: first I have to run a simple part of the test, non parallel, and after that I run the parallel test.

My problem is that I'd like to join all that into one automate test, but I can't do that because of the following: In order to run the parallel test I either have to run it using Run Configurations and specify the xml linked to it or run it from the xml file itself.

So, anyone that could help me on that? If I'm trying to do something impossible I'd appreciate to know it too!

Nobody answered but I finally fixed it using the parallel="classes"! So, instead of running parallel tests I run parallel classes inside one particular test. The xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="10" name="Suite" preserve-order="false">

 <test name="FirstTest">
  <classes>
    <class name="nonparallel.class"/>
  </classes>
  </test>

  <test name="SecondTest" parallel="classes" >
   <classes>
    <class name="parallel.class1"/>
    <class name="parallel.class2"/>
    <class name="parallel.class3"/>
   </classes>
  </test> <!-- Test -->
</suite>

First test will be run at the beginning and after that the parallel classes will run in parallel!

I hope it can help someone!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM