How to generate the test-output folder for a testNG test?
I am trying to get the default testng report, index.html
Netbeans7/windows7
I made a simple testng test case, ran it in netbeans 7, and here is the result. I see no test-output. I am displaying the project and file structure.
If I need to do something with ant or maven, please describe VERY detailed steps as to how to proceed on Windows 7 -- I am new to both of those tools.
If I need to do something with build.xml, please give explicit, detailed steps
EDIT:
here is a screenshot of my final netbeans layout, including the TestSuite.xml file that got the results folder to generate:
I had the same problem using IntelliJ and that's how I fixed it:
Select Use default reporters under the Listeners tab on the Run/Debug Configurations
PS: Remember to add the path for the testng xml file under the Suite field
By default the report files (HTML & XML) are written to a folder named test-output
under your workspace.
Netbeans however overrides this location. It places output to build/test/results
folder. Please re-run the TestNG test suite and watch results folder. All required files will be generated there.
If you want to tinker with the output location open file nbproject/project.properties
under your project folder. In that file there is a property called build.test.results.dir
which gets passed as an argument to ant task for TestNG run. I do not think you need to edit netbeans generated build files for this purpose.
Also, when you run the tests, have a look at the console(netbeans) output, there it may print messages such as :
[-d output-directory]
default output directory to : test-output
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