How do you guys run single tests with IDEA's TestNG plugin? I tried creating a focus group, but it seems the TestNG plugin does not resolve dependencies to other tests automatically. Even when I comment out dependsOnMethods
, it seems @BeforeMethod
is not run.
Advice is greatly appreciated,
Robin
Rerun a single test Right-click a test on the Test Runner tab of the Run tool window and select Run 'test name'.
Run a test suite To be able to run a TestNG test suite, create a run configuration for this suite: From the main menu, select Run | Edit Configurations. and from the list that opens, select TestNG. Name the new configuration.
The plugin is free and can be downloaded and installed using IntelliJ IDEA Plugin Manager. The plugin is available for both IntelliJ IDEA 5.
If you mean a single test method inside a test class there is a right-click option called Run "testMethod"
where testMethod is the actual method name.
The short cut is ctrl+shift+F10.
If you put the cursor between methods (even outside the javadoc) or outside the entire class it will test all methods in that file.
Bring the class into focus in the editor, and then simply right-click, select run?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With