Home > Software design >  Can we execute only failed test cases in Jenkins?
Can we execute only failed test cases in Jenkins?

Time:04-07

If we build and execute selenium (TestNG) suite in Jenkins and if some tests fails; after fixing is there any way to execute only those failed test cases in Jenkins?

CodePudding user response:

Please try below to run specific tests (example: testcases you have fixed) with mnetioning below include tag in testNG.xml

<classes>
    <class name="test.IndividualMethodsTest">
      <methods>
        <include name="testMethod" />
      </methods>
    </class>
  </classes>

CodePudding user response:

From my QA and automation perspective, it's always better to run the entire suite from jenkins, if you want to check why they fail you can do it locally. the other option is to parameterize the xml but it is a lot of work, it could be by maven arguments and writing in the xml

  • Related