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

Key: IDEADEV-28115
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Mark Derricutt
Reporter: John Smith
Votes: 0
Watchers: 1
Operations

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

TestNG plugin: Cannot specify Method Selector

Created: 03 Jan 08 22:28   Updated: 11 Jul 08 12:25
Component/s: Unit Testing. TestNG
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: using the included TestNG plugin

Build: 7,590
Severity: Medium


 Description  « Hide
In TestNG, you can specify a class (or classes) that implements IMethodSelector with a priority. The class is then used to accept or reject test methods before any test execution occurs. You must specify method selectors in the testng.xml file.

Here is an example element that is a child of the 'test' element:
<method-selectors>
<method-selector>
<selector-class name="classLevelFacts.withAttributes.SpecialTypeMethodSelector" priority="15"/>
</method-selector>
</method-selectors>

Ideally I would be able to specify a selector-class and priority for my default TestNG run configuration. (I can imagine choosing it from IMethodSelectors in my project.) It would be used in any automatically-generated TestNG run configuration, which would then put the necessary bits in the temporary testng.xml file created. For my uses, a single selector-class would suffice. Note that TestNG accepts any number of selector-classes, as well as beanshell script fragments as method-selectors.

Another way to support this and other TestNG xml-only configurations is to allow users to specify or define an xml template. The plugin would then only replace the relevant bits when generating the temp XML file for each run.



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