Re: [Dev] @BeforeTest and @AfterTest runs for each test instantiated with @Factory in TAF 4.3.1

2015-03-17 Thread Malithi Edirisinghe
Hi All, Thanks for the replies. @Saneth, I will try with your suggestion. Thanks, Malithi. On Tue, Mar 17, 2015 at 8:42 AM, Saneth Dharmakeerthi wrote: > Hi Malithi & Krishantha, > > > I created a similar scenario and analyse the method call order and > noticed that @Factory is get called f

Re: [Dev] @BeforeTest and @AfterTest runs for each test instantiated with @Factory in TAF 4.3.1

2015-03-16 Thread Saneth Dharmakeerthi
Hi Malithi & Krishantha, I created a similar scenario and analyse the method call order and noticed that @Factory is get called first. @BeforeTest and @AfterTest that are in separate class execute only once. But @BeforeTest and @AfterTest in the same class with @Factory ,@BeforeClass..,@Test a

Re: [Dev] @BeforeTest and @AfterTest runs for each test instantiated with @Factory in TAF 4.3.1

2015-03-16 Thread Krishantha Samaraweera
Hi Malithi, On Mon, Mar 16, 2015 at 6:44 PM, Malithi Edirisinghe wrote: > Hi All, > > I'm using Factories in TestNG to instantiate tests dynamically for > different parameter sets. And I have configured the test class inside a > block in the testng.xml as below. > > > > name="org

Re: [Dev] @BeforeTest and @AfterTest runs for each test instantiated with @Factory in TAF 4.3.1

2015-03-16 Thread Malithi Edirisinghe
Hi Irham, On Mon, Mar 16, 2015 at 10:18 PM, Irham Iqbal wrote: > Hi Malithi, > > Since you have only one class with all the test cases you can use > *@BeforeClass,@AfterClass* this will run before and after all the test > methods inside the class. > It's just not a one class. It's a factory as

Re: [Dev] @BeforeTest and @AfterTest runs for each test instantiated with @Factory in TAF 4.3.1

2015-03-16 Thread Irham Iqbal
Hi Malithi, Since you have only one class with all the test cases you can use *@BeforeClass,@AfterClass* this will run before and after all the test methods inside the class. TestNG version 6.8.x we have noticed some issues(i.e dependsOnMethods doesn't work) Thanks, Iqbal On Mon, Mar 16, 2015 at

Re: [Dev] @BeforeTest and @AfterTest runs for each test instantiated with @Factory in TAF 4.3.1

2015-03-16 Thread Malithi Edirisinghe
Yes, 'BeforeTest' and 'AfterTest' resides in the same class. As I have mentioned above I think the problem is with TestNG 6.1.1 version. On Mon, Mar 16, 2015 at 7:57 PM, Saneth Dharmakeerthi wrote: > [Adding: Krishantha] > > Hi Malithi, > > Have you written the 'BeforeTest' and 'AfterTest' ins

Re: [Dev] @BeforeTest and @AfterTest runs for each test instantiated with @Factory in TAF 4.3.1

2015-03-16 Thread Saneth Dharmakeerthi
[Adding: Krishantha] Hi Malithi, Have you written the 'BeforeTest' and 'AfterTest' inside the same test class with 'BeforeClasst' ,'AfterClasst and other "@Test" test methods? If so put 'BeforeTest' and 'AfterTest' in a different class and add that class to testng.xml with OpenIDSSOTestCase.

[Dev] @BeforeTest and @AfterTest runs for each test instantiated with @Factory in TAF 4.3.1

2015-03-16 Thread Malithi Edirisinghe
Hi All, I'm using Factories in TestNG to instantiate tests dynamically for different parameter sets. And I have configured the test class inside a block in the testng.xml as below. When running this test on the TAF 4.3.1 I found that the methods annotated with 'BeforeTest'