Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Iam new to selenium suite, please show me how to run an particular test in an test suite,

Below is my test suite,

<!DOCTYPE suite SYSTEM "" >

<suite name="TestAll">

<test name="order">
        <class name="testSuite.TestConfig" />
        <class name="testSuite.TestOrder" />

<test name="database">  
        <class name="testSuite.TestConfig" />
        <class name="testSuite.TestDatabase" />

I wanted to run the test that has name "database", but without deleting the test that has name "order", so is there any way to do it? please throw me the light.

share|improve this question
up vote 1 down vote accepted

There are two ways of proceeding with this.

  1. Go to the actual class file testSuite.TestOrder and change the @Test tag on the method to @Test(enabled="false") But you will have to recompile your class files every time you have to make a change.

  2. @Test(group={"ignore"}) TestNG has a group option which help you categorize the tests. Mark all test that you want to ignore during the run in the above format. Now modify the testng.xml

Use this and experiment around.

share|improve this answer
can i make any annotations in xml file rather than java file? – Emmanuel Angelo.R Apr 17 '14 at 10:50
No you have to put the annotations in the java file.You can control them at run time using testng.xml. That is you can include or exclude groups any which way you want in the xml. – MridulJ Apr 17 '14 at 11:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.