Skip to content

Retry Failed Testcases using Arrow

andrewleo edited this page Mar 18, 2014 · 2 revisions

As we know, Web UI autotest is not as stable as other kinds of tests such as: interface test, unit test.

So we integrate Arrow( a TestNG plugin to re-run failed test cases download here) to re-run failed testcases, and the usage of Arrow can be found here.

How to use

Step 1, config.properties is necessary if using Arrow to re-run failed test cases, and can be configured as follow in the root of your project:

retrycount=1 #Not must be specified, default value is  0
sourcecodedir=src #Not must be specified, default value is src
sourcecodeencoding=UTF-8 #Not must be specified, default value is utf-8

So first of all you should add Arrow into your pom.xml, or your classpath

Step 2, use Dagger's TestNG jar file to run testcases (In Eclipse testcases are run with TestNG plugin's jar file). Here we use Apache Maven and prepare a pom.xml under Dagger's root path, plugin named maven-surefire-plugin will help you run relevant testcases, just modify the suiteXmlFile tag and execute mvn clean test -DBrowserCoreType=X as follows, have a try:-)

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.16</version>
    <configuration>
      <testFailureIgnore>true</testFailureIgnore>
      <suiteXmlFiles>
        <suiteXmlFile>${basedir}/test-xml/demo.xml</suiteXmlFile>
      </suiteXmlFiles>
    </configuration>
  </plugin>