The report is longer than we can see here but I’m still not very happy with it. Code coverage reportsĪfter running the batch file in my playground test project folder I see the following report in browser. Here’s the command for this: chmod +x run-tests.sh Shell script may also need execute permissions. Not sure why tooling needs sudo but this is what is asked for. logger 'xunit LogFileName=TestResults.xml' Sudo dotnet test -logger 'trx LogFileName=x' Here’s sample script for linux (every command goes to one line): On Linux we need shell script to run tests and generate reports. It’s time to run the script and see if it runs successfully to end. I think this command is not very cryptic and I don’t make additional comments on command line parameters here.Īs a lazy guy I expect browser to open with newly generated reports automatically and this is why the last line of my run-tests.bat is: start BuildReports\Coverage\index.htm Here is the command (put it all on one line): tools\reportgenerator.exe ^ The reports are generated to same folder to keep folder tree smaller. This command will run report generator that generater reports based on. Generating code coverage reportsįor code coverage reports we need to add another command to run-tests.bat file. Now it’s time to try out run-tests.bat to see if everything still works and if files generated to expected locations. gitignore file to avoid BuildReports folder getting to source code repository.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |