Need help in scripting using TestNG

@bhaskar @willosser
I have a script for Login page. it results in Home page…

Can i write an another script using another class to operate on home page…??

I am using TestNG

For Example
Class A{
@Before
{
capabilities
}
@test
{
Login operation
}

After this i have created a classB

classB

@Test
{
home page operations
}

How can i integrate these two class and execute it in one shot?

Can we do it?

Any suggestions would be helpful.

thanks,
Sudhanva

Yes @sudhanvam,
You can execute those classes in parallel with the help of Testng.xml file.

  <suite name="regression suite" parallel="classes">
<classes>
          <class name="ClassA"/>
          <class name ="ClassB"/>
</classes> 
</suite>

Hope this helps you,
Thanks,
Bhaskar.

@bhaskar

I tried it, But its stop executing after first test.

You should try to move the capabilities to a different class and extend all the tests Classes from Capability class.

Then you can try using maven modules with TestNG groups.

in pom.xml

<configuration>
    <groups>${testGroups}</groups>
</configuration>

In your test

@Test(groups = {IOS})

now run the test with

mvn -DtestGroups=IOS