Generating code coverage reports
Let’s automate the command that produces the code coverage report with the External Tools Configurations of Eclipse. You made a configuration of this type before, in Chapter 2, Setting Up the Environment for Our E-Commerce Application, remember? Let us do it again:
- Access the Run | External Tools/External Tools Configurations.... menu as you did before and create a configuration with the following parameters under the Main tab:
- Name:
Code Coverage
- Location:
${project_loc}/vendor/bin/phpunit
- Working Directory:
${project_loc}/src
- Arguments:
--coverage-html code_coverage
- Name:
- Don’t forget to check the External Tools item under the Common tab:
Figure 3.25 – The checkbox for displaying the external tools in the menu