Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use another PIT output format to provide more information #616

Closed
oscarlvp opened this issue Oct 26, 2018 · 7 comments
Closed

Use another PIT output format to provide more information #616

oscarlvp opened this issue Oct 26, 2018 · 7 comments
Assignees
Labels
feature high priority This issue has the highest priority and should be fixed as soon as possible

Comments

@oscarlvp
Copy link
Member

Characteristics

  • Issue Type: feature
  • Severity: feature

Description

Currently DSpot relies on the CSV report output produced by PIT. However this report is limited in information. It would be better to use the XML report, provided by default, or the JSON report provided by Descartes. These two formats include for each mutant the package, class, method name, method signature and line in which the mutant was created. This information could be also included in the report generated by DSpot.

@danglotb
Copy link
Member

Hi,

I suggest @andrewbwogi takes care of this issue.
Since this feature is external to the core and we can do it step by step, I think it is a good start.

@andrewbwogi I propose you a list of small tasks:

  • run pit on test-projects (in the test resources of DSpot) and enable a suggested format output (XML or JSON).
  • modify the PitResultParser to load such report instead of CSV report. You should write a test and use the example report generated at the previous step. You have to create a new class that encode the reports in DSpot.
  • modify the PitMutantScoreSelector to use the previous objects. We can discuss the detail of this task after you completed to two first.

If you have any question or trouble, I propose you to continue on this thread, in order to clarify the asked task and you should done them.

Last but not least, propose your changes throught a pull request.

Thank you!

@andrewbwogi
Copy link
Contributor

Hi @oscarlvp and @danglotb, I will look into this.

@danglotb danglotb assigned danglotb and unassigned danglotb Oct 29, 2018
@danglotb
Copy link
Member

danglotb commented Nov 7, 2018

Hi @andrewbwogi any news on this?

@andrewbwogi
Copy link
Contributor

Hi @danglotb, I'm currently studying the code. Is it correct that it's the report generation which saves .json and .txt files in the output directory that needs a new class?

@danglotb
Copy link
Member

danglotb commented Nov 7, 2018

Hi @andrewbwogi

I am sorry, I might have confused you.

The first task should be done out of DSpot, on the command line by using the maven plugin of PIT.

For instance, you will run on the test-projects (src/test/resources/test-projects) the following command line:

mvn clean test -DskipTests org.pitest:pitest-maven:mutationCoverage

the clean test -DskipTests goals compile the sources and the tests, but do not run them. Pit is using the compiled file (.class) to run the mutation analysis. That why we need to compile them. then org.pitest:pitest-maven:mutationCoverage is the goal of to run the mutation analysis by PIT.

What we ask for the first step, is to run PIT and obtain a JSON or a XML file report.

To do this, you should have a look to the documentation of PIT.

and play with several command line options.

@andrewbwogi
Copy link
Contributor

I've completed the first and the second task. I've modified the PitMutantScoreSelector to use an abstract Pit result so switching between using CSV and XML files will be easier. Now I'll look at how DSpot can use an XML output file from Pit as default.

@danglotb
Copy link
Member

Hi @andrewbwogi

Thank you! Do not hesitate to open a pull request. That will allow us to discuss the changes.

Best.

@danglotb danglotb added feature high priority This issue has the highest priority and should be fixed as soon as possible labels Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature high priority This issue has the highest priority and should be fixed as soon as possible
Projects
None yet
Development

No branches or pull requests

3 participants