How to prevent invoking of multiple data provider

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to prevent invoking of multiple data provider

Fanindra Bapat
Hi ,

I am running the regression test suite wherein I am creating random test data such as first name,last name and getting some values from database.
I am using selective test case approach wherein I am reading the run mode of a particular test case set to "Y" from excel sheet.

Problem is evenif the runmode is set to "N" Data provider is called and data is created.I want to generate the data run time only.

Below is the snippet of the code:

@DataProvider
    public Object[][] getTestData() throws SQLException{
        Object[][] o = new Object[1][1];
        List<XX> billingList = new ArrayList<XX>();
                           
        pstmt = conn.prepareStatement("select top 1 * from vygr. REFERENCECODEVALUE with (nolock) where referencecodeid=337 order by newid ()    ");
            rs1 = pstmt.executeQuery();
            String A= null;
            String B= null;
            while (rs1.next()){
                A= rs1.getString("VALUEDESCRIPTION").trim();
                System.out.println("A= " + A);
            }
           
            pstmt = conn.prepareStatement("select top 1* from vygr. REFERENCECODEVALUE with (nolock) where referencecodeid=311 order by newid ()    ");
            rs2 = pstmt.executeQuery();
            while (rs2.next()){
                B= rs2.getString("VALUEDESCRIPTION").trim();
                System.out.println("B= " + B);
            }
           
           
        // Object[][] o = new Object[TestBase.enrollmentList.size()][4];
        for(int i = 0; i < 1; i++){
            XpbData = new X();
            pbData.setCriteriaName(TestUtil.randomString(8));
         
            billingList.add(pbData);
        }
 I am using testng 6.8
Java version - 1.7
Selenium  - 2.37.0

please let me know if I am missing any information.

please advise

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent invoking of multiple data provider

Krishnan Mahadevan
Hmm.. I haven't understood your question properly, but you could try using the Lazy Data Provider approach of TestNG wherein you leverage Iterators and create data only per iteration rather than have all of the data being created upfront and then have the @Test method interact with the data provider


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


On Tue, Dec 17, 2013 at 4:37 PM, Fanindra Bapat <[hidden email]> wrote:
Hi ,

I am running the regression test suite wherein I am creating random test data such as first name,last name and getting some values from database.
I am using selective test case approach wherein I am reading the run mode of a particular test case set to "Y" from excel sheet.

Problem is evenif the runmode is set to "N" Data provider is called and data is created.I want to generate the data run time only.

Below is the snippet of the code:

@DataProvider
    public Object[][] getTestData() throws SQLException{
        Object[][] o = new Object[1][1];
        List<XX> billingList = new ArrayList<XX>();
                           
        pstmt = conn.prepareStatement("select top 1 * from vygr. REFERENCECODEVALUE with (nolock) where referencecodeid=337 order by newid ()    ");
            rs1 = pstmt.executeQuery();
            String A= null;
            String B= null;
            while (rs1.next()){
                A= rs1.getString("VALUEDESCRIPTION").trim();
                System.out.println("A= " + A);
            }
           
            pstmt = conn.prepareStatement("select top 1* from vygr. REFERENCECODEVALUE with (nolock) where referencecodeid=311 order by newid ()    ");
            rs2 = pstmt.executeQuery();
            while (rs2.next()){
                B= rs2.getString("VALUEDESCRIPTION").trim();
                System.out.println("B= " + B);
            }
           
           
        // Object[][] o = new Object[TestBase.enrollmentList.size()][4];
        for(int i = 0; i < 1; i++){
            XpbData = new X();
            pbData.setCriteriaName(TestUtil.randomString(8));
         
            billingList.add(pbData);
        }
 I am using testng 6.8
Java version - 1.7
Selenium  - 2.37.0

please let me know if I am missing any information.

please advise

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent invoking of multiple data provider

Fanindra Bapat
Hi Krishnan,

Thanks for the reply...I will try to rephrase my question
I have 10 test cases in module A & 10 test cases in module B

For Module A for some of the test cases I am creating the data such as .dat file which is made configurable as per test environment and for some other test cases I am fetching this data randomly from database. ( .Dat file which are generated are placed in specific folder structure in test environment )
Note - For module A runmode in excel is set to "N" fro all test cases.

Now For module B I want to execute 10 test cases for which run mode is set to "Y".

When I run it from Testng.xml as a suite then data is being created for module A also.I want to prevent this data from getting generated.

Hope I am clear...

On Tuesday, 17 December 2013 19:19:25 UTC+5:30, Krishnan wrote:
Hmm.. I haven't understood your question properly, but you could try using the Lazy Data Provider approach of TestNG wherein you leverage Iterators and create data only per iteration rather than have all of the data being created upfront and then have the @Test method interact with the data provider

<a href="http://books.google.co.in/books?id=bCvcMcLZwV4C&amp;pg=SA2-PA41&amp;lpg=SA2-PA41&amp;dq=testng+lazy+data+provider+sample&amp;source=bl&amp;ots=83JJrMZKmD&amp;sig=HM-xnx9ObiNZ5UZ7aEVCrMBPsIY&amp;hl=en&amp;sa=X&amp;ei=7VWwUsn6K9fioAT4toDwDQ&amp;ved=0CGMQ6AEwCQ" style="color:rgb(102,0,153)" target="_blank" onmousedown="this.href='http://books.google.co.in/books?id\75bCvcMcLZwV4C\46pg\75SA2-PA41\46lpg\75SA2-PA41\46dq\75testng+lazy+data+provider+sample\46source\75bl\46ots\7583JJrMZKmD\46sig\75HM-xnx9ObiNZ5UZ7aEVCrMBPsIY\46hl\75en\46sa\75X\46ei\0757VWwUsn6K9fioAT4toDwDQ\46ved\0750CGMQ6AEwCQ';return true;" onclick="this.href='http://books.google.co.in/books?id\75bCvcMcLZwV4C\46pg\75SA2-PA41\46lpg\75SA2-PA41\46dq\75testng+lazy+data+provider+sample\46source\75bl\46ots\7583JJrMZKmD\46sig\75HM-xnx9ObiNZ5UZ7aEVCrMBPsIY\46hl\75en\46sa\75X\46ei\0757VWwUsn6K9fioAT4toDwDQ\46ved\0750CGMQ6AEwCQ';return true;">Next Generation Java TestingTestNG and Advanced Concepts


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;">http://wakened-cognition.blogspot.com/


On Tue, Dec 17, 2013 at 4:37 PM, Fanindra Bapat <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="ap022OLS4GsJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">fanindr...@...> wrote:
Hi ,

I am running the regression test suite wherein I am creating random test data such as first name,last name and getting some values from database.
I am using selective test case approach wherein I am reading the run mode of a particular test case set to "Y" from excel sheet.

Problem is evenif the runmode is set to "N" Data provider is called and data is created.I want to generate the data run time only.

Below is the snippet of the code:

@DataProvider
    public Object[][] getTestData() throws SQLException{
        Object[][] o = new Object[1][1];
        List<XX> billingList = new ArrayList<XX>();
                           
        pstmt = conn.prepareStatement("select top 1 * from vygr. REFERENCECODEVALUE with (nolock) where referencecodeid=337 order by newid ()    ");
            rs1 = pstmt.executeQuery();
            String A= null;
            String B= null;
            while (rs1.next()){
                A= rs1.getString("VALUEDESCRIPTION").trim();
                System.out.println("A= " + A);
            }
           
            pstmt = conn.prepareStatement("select top 1* from vygr. REFERENCECODEVALUE with (nolock) where referencecodeid=311 order by newid ()    ");
            rs2 = pstmt.executeQuery();
            while (rs2.next()){
                B= rs2.getString("VALUEDESCRIPTION").trim();
                System.out.println("B= " + B);
            }
           
           
        // Object[][] o = new Object[TestBase.enrollmentList.size()][4];
        for(int i = 0; i < 1; i++){
            XpbData = new X();
            pbData.setCriteriaName(TestUtil.randomString(8));
         
            billingList.add(pbData);
        }
 I am using testng 6.8
Java version - 1.7
Selenium  - 2.37.0

please let me know if I am missing any information.

please advise

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="ap022OLS4GsJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="ap022OLS4GsJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">testng...@....
Visit this group at <a href="http://groups.google.com/group/testng-users" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;">https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent invoking of multiple data provider

Krishnan Mahadevan
Does it mean that you have two <tests> and the mode of fetching data is being controlled by a <parameter> at the suite level and based on this parameter you would like to enable/disable a data provider from creating any data ?
If yes, then you might want to try passing the ITestContext object to your data provider, read the parameter from ITestContext and then skip the data provider's action accordingly.
Would that work ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


On Wed, Dec 18, 2013 at 10:05 AM, Fanindra Bapat <[hidden email]> wrote:
Hi Krishnan,

Thanks for the reply...I will try to rephrase my question
I have 10 test cases in module A & 10 test cases in module B

For Module A for some of the test cases I am creating the data such as .dat file which is made configurable as per test environment and for some other test cases I am fetching this data randomly from database. ( .Dat file which are generated are placed in specific folder structure in test environment )
Note - For module A runmode in excel is set to "N" fro all test cases.

Now For module B I want to execute 10 test cases for which run mode is set to "Y".

When I run it from Testng.xml as a suite then data is being created for module A also.I want to prevent this data from getting generated.

Hope I am clear...

On Tuesday, 17 December 2013 19:19:25 UTC+5:30, Krishnan wrote:
Hmm.. I haven't understood your question properly, but you could try using the Lazy Data Provider approach of TestNG wherein you leverage Iterators and create data only per iteration rather than have all of the data being created upfront and then have the @Test method interact with the data provider


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


On Tue, Dec 17, 2013 at 4:37 PM, Fanindra Bapat <[hidden email]> wrote:
Hi ,

I am running the regression test suite wherein I am creating random test data such as first name,last name and getting some values from database.
I am using selective test case approach wherein I am reading the run mode of a particular test case set to "Y" from excel sheet.

Problem is evenif the runmode is set to "N" Data provider is called and data is created.I want to generate the data run time only.

Below is the snippet of the code:

@DataProvider
    public Object[][] getTestData() throws SQLException{
        Object[][] o = new Object[1][1];
        List<XX> billingList = new ArrayList<XX>();
                           
        pstmt = conn.prepareStatement("select top 1 * from vygr. REFERENCECODEVALUE with (nolock) where referencecodeid=337 order by newid ()    ");
            rs1 = pstmt.executeQuery();
            String A= null;
            String B= null;
            while (rs1.next()){
                A= rs1.getString("VALUEDESCRIPTION").trim();
                System.out.println("A= " + A);
            }
           
            pstmt = conn.prepareStatement("select top 1* from vygr. REFERENCECODEVALUE with (nolock) where referencecodeid=311 order by newid ()    ");
            rs2 = pstmt.executeQuery();
            while (rs2.next()){
                B= rs2.getString("VALUEDESCRIPTION").trim();
                System.out.println("B= " + B);
            }
           
           
        // Object[][] o = new Object[TestBase.enrollmentList.size()][4];
        for(int i = 0; i < 1; i++){
            XpbData = new X();
            pbData.setCriteriaName(TestUtil.randomString(8));
         
            billingList.add(pbData);
        }
 I am using testng 6.8
Java version - 1.7
Selenium  - 2.37.0

please let me know if I am missing any information.

please advise

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent invoking of multiple data provider

Fanindra Bapat
Hi Krishnan,

Thanks for the suggestion.

Just to clarify that this problem is resolved as I am using selective test case approach wherein I am reading the run mode of a particular test case set to "Y" from excel sheet. I added this code in the Data provider itself which resulted in resolving this issue.

Thanks

On Friday, 20 December 2013 12:45:59 UTC+5:30, Krishnan wrote:
Does it mean that you have two <tests> and the mode of fetching data is being controlled by a <parameter> at the suite level and based on this parameter you would like to enable/disable a data provider from creating any data ?
If yes, then you might want to try passing the ITestContext object to your data provider, read the parameter from ITestContext and then skip the data provider's action accordingly.
Would that work ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;">http://wakened-cognition.blogspot.com/


On Wed, Dec 18, 2013 at 10:05 AM, Fanindra Bapat <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="JDooOF59nE8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">fanindr...@...> wrote:
Hi Krishnan,

Thanks for the reply...I will try to rephrase my question
I have 10 test cases in module A & 10 test cases in module B

For Module A for some of the test cases I am creating the data such as .dat file which is made configurable as per test environment and for some other test cases I am fetching this data randomly from database. ( .Dat file which are generated are placed in specific folder structure in test environment )
Note - For module A runmode in excel is set to "N" fro all test cases.

Now For module B I want to execute 10 test cases for which run mode is set to "Y".

When I run it from Testng.xml as a suite then data is being created for module A also.I want to prevent this data from getting generated.

Hope I am clear...

On Tuesday, 17 December 2013 19:19:25 UTC+5:30, Krishnan wrote:
Hmm.. I haven't understood your question properly, but you could try using the Lazy Data Provider approach of TestNG wherein you leverage Iterators and create data only per iteration rather than have all of the data being created upfront and then have the @Test method interact with the data provider

<a href="http://books.google.co.in/books?id=bCvcMcLZwV4C&amp;pg=SA2-PA41&amp;lpg=SA2-PA41&amp;dq=testng+lazy+data+provider+sample&amp;source=bl&amp;ots=83JJrMZKmD&amp;sig=HM-xnx9ObiNZ5UZ7aEVCrMBPsIY&amp;hl=en&amp;sa=X&amp;ei=7VWwUsn6K9fioAT4toDwDQ&amp;ved=0CGMQ6AEwCQ" style="color:rgb(102,0,153)" target="_blank" onmousedown="this.href='http://books.google.co.in/books?id\75bCvcMcLZwV4C\46pg\75SA2-PA41\46lpg\75SA2-PA41\46dq\75testng+lazy+data+provider+sample\46source\75bl\46ots\7583JJrMZKmD\46sig\75HM-xnx9ObiNZ5UZ7aEVCrMBPsIY\46hl\75en\46sa\75X\46ei\0757VWwUsn6K9fioAT4toDwDQ\46ved\0750CGMQ6AEwCQ';return true;" onclick="this.href='http://books.google.co.in/books?id\75bCvcMcLZwV4C\46pg\75SA2-PA41\46lpg\75SA2-PA41\46dq\75testng+lazy+data+provider+sample\46source\75bl\46ots\7583JJrMZKmD\46sig\75HM-xnx9ObiNZ5UZ7aEVCrMBPsIY\46hl\75en\46sa\75X\46ei\0757VWwUsn6K9fioAT4toDwDQ\46ved\0750CGMQ6AEwCQ';return true;">Next Generation Java TestingTestNG and Advanced Concepts


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;">http://wakened-cognition.blogspot.com/


On Tue, Dec 17, 2013 at 4:37 PM, Fanindra Bapat <[hidden email]> wrote:
Hi ,

I am running the regression test suite wherein I am creating random test data such as first name,last name and getting some values from database.
I am using selective test case approach wherein I am reading the run mode of a particular test case set to "Y" from excel sheet.

Problem is evenif the runmode is set to "N" Data provider is called and data is created.I want to generate the data run time only.

Below is the snippet of the code:

@DataProvider
    public Object[][] getTestData() throws SQLException{
        Object[][] o = new Object[1][1];
        List<XX> billingList = new ArrayList<XX>();
                           
        pstmt = conn.prepareStatement("select top 1 * from vygr. REFERENCECODEVALUE with (nolock) where referencecodeid=337 order by newid ()    ");
            rs1 = pstmt.executeQuery();
            String A= null;
            String B= null;
            while (rs1.next()){
                A= rs1.getString("VALUEDESCRIPTION").trim();
                System.out.println("A= " + A);
            }
           
            pstmt = conn.prepareStatement("select top 1* from vygr. REFERENCECODEVALUE with (nolock) where referencecodeid=311 order by newid ()    ");
            rs2 = pstmt.executeQuery();
            while (rs2.next()){
                B= rs2.getString("VALUEDESCRIPTION").trim();
                System.out.println("B= " + B);
            }
           
           
        // Object[][] o = new Object[TestBase.enrollmentList.size()][4];
        for(int i = 0; i < 1; i++){
            XpbData = new X();
            pbData.setCriteriaName(TestUtil.randomString(8));
         
            billingList.add(pbData);
        }
 I am using testng 6.8
Java version - 1.7
Selenium  - 2.37.0

please let me know if I am missing any information.

please advise

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/testng-users" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;">https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="JDooOF59nE8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="JDooOF59nE8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">testng...@....
Visit this group at <a href="http://groups.google.com/group/testng-users" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;">https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re-running only failed methods/tests from testng when running from jenkins

vasikarla.raj
Hi,

Is there a way to re-run only the failed tests from an testng xml when running tests via jenkins?

-RV

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

AW: [testng-users] Re-running only failed methods/tests from testng when running from jenkins

Hubert Grzeskowiak
Hi RV,

since TestNG creates an XML suite containing failed tests and puts it always in the same directory ("test-outputs/testng-failed.xml" by default) you can create a jenkinks job that runs that suite after the usual testing suite(s).

Regards
Hubert Grzeskowiak
________________________________________
Von: [hidden email] [[hidden email]] im Auftrag von Vasikarla, Raj [[hidden email]]
Gesendet: Freitag, 10. Januar 2014 08:05
An: [hidden email]
Betreff: [testng-users] Re-running only failed methods/tests from testng when running from jenkins

Hi,

Is there a way to re-run only the failed tests from an testng xml when running tests via jenkins?

-RV

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.