History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-28116
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Anna Kozlova
Reporter: John Smith
Votes: 4
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

TestNG plugin result tree and summary incorrect for TestNG Factories

Created: 03 Jan 08 22:01   Updated: 22 Jul 08 17:33
Component/s: Unit Testing. TestNG
Fix Version/s: Diana 8618

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Java Source File FactoryProblemTestngPluginTest.java (0.9 kb)

Environment: using included TestNG plugin

Build: 7,590
Fixed in build: 8,609
Severity: Medium


 Description  « Hide
When using TestNG factories, the result tree only shows one instance of each class and test methods executed instead of one node for each class instance and its accompanying test methods. Furthermore, the summary number of tests executed is also incorrect. Interestingly, the Statistics tab shows each test method executed, albeit without any indication to which class instance they belong.

Expected behavior: The result tree should show one node for each class instance. If the class implements ITest, then each class instance node should have the return value of getTestName() appended to it. (This is standard TestNG behavior.) The summary number of tests should reflect the correct number of tests executed.

Steps to reproduce:

1) Create a project and add the attached source to it.
2) Include the testng jar as a project dependency.
3) Right-click the class in the attached source file (FactoryProblemTestngPluginTest) and choose Run.

The Run frame comes up. Note that the Test Results tree only has one test method in it. (There should be two.) Also, the summary reads: "Done: 1 of 1 Failed: 1", which is also incorrect.

4) Click on the Statistics tab. There you will see both tests.

You can also bring up the index.html file in the test-output directory of your project. From there, click Custom Suite and then click Results (on the lower right of the frame). In the right frame, you will see both tests. If you hover on the method names, you will see the class instance name appendages.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.