mardi 16 mai 2017

Continuous testing using testng or any other framework

One of our application needs a continuous testing

Let's say my sample test class looks like below.

Class someClass {

      @Test
      public test_method1() {
              //do something
              //takes one minute to complete execution
      }
      @Test
      public test_method2() {
              //do something
              //takes ten minutes to complete execution
      }
      @Test
      public test_method3() {
              //do something
              //takes one minute to complete execution
      }
}

And my testng.xml will look something like this.

<!DOCTYPE suite SYSTEM "http://ift.tt/19x2mI9" >
<suite name="someSuite" parallel="tests">
   <test name="someTest" parallel="methods" thread-count="3">
        <classes>
            <class name="someClass" />
        </classes>
    </test>
</suite>

Let's say each of my test methods take different times to complete execution. Suppose test_method1 and test_method3 take 1 minute for completion, and test_method2 will take 10 minutes for completion.

Since each of my test methods needs to be continuously tested, is there a way to run rerun test_method1 and test_method3 as soon as they complete execution, instead of waiting for test_method2 to complete execution. Is there a way to configure this in testng or any other approach?

Aucun commentaire:

Enregistrer un commentaire