testng-team / testng

TestNG testing framework
https://testng.org
Apache License 2.0
1.98k stars 1.02k forks source link

Factories issue #282

Closed skuts closed 7 years ago

skuts commented 12 years ago

Environment and tools: IntelliJ IDEA 11.1.3, Java, TestNG 6.8, Selenium Grid 2, Chrome

Problems: 1) After test finishing IntelliJ in a status window increments the amount of total run tests. 2) While test running there are lots of browser instances in a task manager, but there is only 1 on the screen. 3) If there's a big input data set, tests are skipped after some period of time. 4) Sometimes amount of webdriver instances increases in a task manager .

In Testng 6.5.2 only second problem occurs.

Code:

public class P001Factory extends P001 {

@Factory(dataProvider = "provider")
public Peelle001Factory(String[] data) {
    super(data);
}

@DataProvider()
public static Object[][] provider() {
    ArrayList<String[]> programsData = dataProvider.getProgramsData();
    Object[][] result = new Object[programsData.size()][];
    int i = 0;

    for(String[] s : programsData){
        result[i] = new Object[]{ Arrays.copyOf(s, s.length) };
        i++;
    }

    return result;
}

}

@BeforeClass(alwaysRun = true) public void start() { if (driver == null) { driver = initDriver(); } }

@AfterClass
public void stop() {
    if (driver != null) {
        driver.close();
        driver.quit();
    }
}
krmahadevan commented 7 years ago

This is an incomplete issue and not much details is available to proceed with investigation. I am closing off this issue since its almost 5 years old with no follow up. Please feel free to comment/re-open if there are more details that can be shared to debug this.