Emailable Report incorrect when using DataProvider and some tests pass, others fail for one testcase

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

Emailable Report incorrect when using DataProvider and some tests pass, others fail for one testcase

TerriM
I have figured out that the issue seems to be with getMethodSet.  You have it adding the ALL test methods that match the name, but it matches it regardless of Pass/Fail.  So then it adds to the report the total number of that test case run.  Notice in the image attached that tc030_login shows 4 entries in Failed and 4 in Passed, when in reality 3 Failed and 1 Passed.  The number shown is correct, but the number of lines is incorrect.  It boils down to how you  " // Add all the invoked methods".  Which honestly is a little confusing as to why.  When using a DataProvider, it doesn't make sense to do this.  


If you simply comment out that for loop, you get a much cleaner Summary.  Each test case is still listed in the report, but the summary would at least be accurate.




Another issue is that the links under Method never link to the proper place in the document.  Even if you don't comment out that for loop, it still doesn't go to correct location in page.



 

--
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 https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Emailable Report incorrect when using DataProvider and some tests pass, others fail for one testcase

TerriM
For anyone interested, attached is a modified version of the file that gets rid of the duplication in summary list, and fixes the numbers in the Summary table at very top.

--
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 https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

EmailableReport.java (21K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Emailable Report incorrect when using DataProvider and some tests pass, others fail for one testcase

TerriM
And I modified it one more time.  It now shows number of Scenarios run (@Test methods) as well as the number of Iterations (@Test with DataProvider running multiple iterations of same scenario).

--
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 https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

EmailableReport.java (21K) Download Attachment