<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name="Test Suite" verbose="5"> <parameter name="appURL" value="http://www.test.com/default.aspx"></parameter> <parameter name="locale" value="us"></parameter> <test name="test in Firefox" parallel="classes" thread-count="3"> <parameter name="browser" value="FF"></parameter> <classes> <class name="com.test.SanityTest"></class> <class name="com.test.SignupTest"></class> <class name="com.test.LoginTest"> </class> </classes> </test> </suite>
Despite I have "parallel= classes" set at test tag level all tests are executed sequentially.
Did I miss something obviously wrong?
~tarun
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/N12cB0vPyu4J.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
public class SelTestCase { protected WebDriver driver; private static final int MAX_WAIT_PERIOD = 20; private String appURL; private String locale; @BeforeClass(alwaysRun=true) @Parameters( { "appURL", "locale" }) public void setTestBed(String appURL, String locale) { this.appURL = appURL; this.locale = locale; } @BeforeMethod(alwaysRun=true) @Parameters({"browser", "chromedriver"}) public void startDriver(@Optional("Chrome") String browser, @Optional String chromeLocation) { if(browser.equalsIgnoreCase("FF")) { driver = new FirefoxDriver(); } else if (browser.equalsIgnoreCase("IE")) { driver = new InternetExplorerDriver(); } else if(browser.equalsIgnoreCase("Chrome")) { System.setProperty("webdriver.chrome.driver", chromeLocation); driver = new ChromeDriver(); } driver.manage().timeouts().implicitlyWait(MAX_WAIT_PERIOD, TimeUnit.SECONDS); } @AfterMethod(alwaysRun=true) public void stopDriver() { driver.quit(); } }
And test classes -
public class SignupTest extends SelTestCase { /** * Registers new user */ @Test public void signUpToFrecklebox() { // some steps here assert HomePage.getLogOutLink().isDisplayed() : "Logout link is not displayed after registration"; } /** * Verifies mandatory field validation for new user sign up */ @Test public void signUpWithEmptyMandatoryFields() { // some steps here assert RegistrationPage.getMandatoryFieldErrorMessage().isDisplayed():"Error message is not displayed for empty mandatory fields"; }
One more test class -
public class LoginTest extends SelTestCase { @Test public void validLogin() { // some steps here assert HomePage.getLogOutLink().isDisplayed() : "Logout link is not displayed when logging in for user: " + data.getRegisteredUserEmail(); } @Test public void loginWithInvalidEmailAddress() { // some steps here assert LoginPage.getInvalidLoginError().isDisplayed() : "Invalid login error message is not displayed when logging with invalid email and valid password"; }
And some more test classes in the same manner.
Hi Cedric,Do you see some thing wrong with code snippets I posted, which would eventually block parallel execution of test.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/xyheEN26rS4J.
But I see them coming one after another, which is as good as "parallel=false".
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/CaVK61TkJVoJ.
Hi Cedric,I get the same results, if I keep parallel attribute at suite levelparallel = methods work but parallel = classes does not
[Invoker 1864729679] Invoking test.tmp.Temp1.temp1M1temp1M1: 12[Invoker 1864729679] Invoking test.tmp.Temp1.temp1M2temp1M2: 12[Invoker 1416386650] Invoking test.tmp.Temp2.temp2M1temp2M1: 13[Invoker 1416386650] Invoking test.tmp.Temp2.temp2M2temp2M2: 13
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/oDqEyKdC6yMJ.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/mh9ry-_h0lgJ.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/RiP4d96xUkMJ.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/exbWvOZi9qEJ.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/exbWvOZi9qEJ.
Thanks
Sai
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/fn9Qvtp16PAJ.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/fn9Qvtp16PAJ.
AFAIK, unless you explicitly tell eclipse, its the testng plugin installed in eclipse that would get called.You can configure eclipse to refer to the testng jar bundled in the project viaProject > Properties > TestNG > Use Project TestNG Jar (check this checkbox)
And there is a problem with testng plugin 6.3.2.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.