Giter Site home page Giter Site logo

Usability enhancement requirement: ability to specify a concrete test suite (or groups of test suites using regular expressions) as target for mutation about pitest-descartes HOT 7 CLOSED

stamp-project avatar stamp-project commented on June 10, 2024
Usability enhancement requirement: ability to specify a concrete test suite (or groups of test suites using regular expressions) as target for mutation

from pitest-descartes.

Comments (7)

danglotb avatar danglotb commented on June 10, 2024

Hello @jesus-gorronogoitia

I know that you can use -DexcludedClasses=<your.test.class>, to prevent pit to execute this specific class (replace <your.test.class> by the full qualified name of your test class or a regex, you can also put several qualified name/regex, separated with comma).

In DSpot, this can be configured in the property file by specifying the property: excludedClasses=my.first.TestClass,my.second.TestClass,all.classes.of.this.package.*

This feature is inside pit, so descartes should have it also ( I'm not sure).

Cheers.

from pitest-descartes.

jesus-gorronogoitia avatar jesus-gorronogoitia commented on June 10, 2024

Bonjour Benjamin,
Indeed I am using a opposite feature, the inclusion feature in the pom.xml file (e.g. pom_for_descartes.xml), so only included test suites are executed. I mentioned this in the steps to reproduce section, but not made it explicitly. This is the way I restricted the test to a concrete one, in the configuration section of the maven-surefire-plugin in Maven, that works well with mvn test, but Descartes still complains the suite is not green:
<includes> <include>**/FeedbackRepositoryProxyTest.java</include> </includes>

from pitest-descartes.

danglotb avatar danglotb commented on June 10, 2024

According to this, you are configuring the maven-surefire-plugin (mvn test command). However, I think descartes does not have the access to this configuration.

I suggest you to explicitly filter your test in the configuration of the descartes plugin with something like:

<excludedClasses>
    <param>com.mycompany.*</param>
    <param>com.mycompany2.SpecificTestClass</param>
</excludedClasses>

You have also the inclusion:

<targetClasses>
    <param>com.mycompany.package.*</param>
    <param>com.mycompany.packageB.Foo*</param>
    <param>com.partner.*</param>
</targetClasses>

So here, we would have:

<includes>
    <include>**/FeedbackRepositoryProxyTest.java</include>
</includes>

for maven-surefire-plugin (mvn test command)

is equivalent to:

<targetClasses>
    <param>**/FeedbackRepositoryProxyTest.java</param>
</targetClasses>

for pit / descartes ( mvn -f pom_for_descartes.xml test org.pitest:pitest-maven:mutationCoverage command)

from pitest-descartes.

jesus-gorronogoitia avatar jesus-gorronogoitia commented on June 10, 2024

Merci Benjamin. I didn't see this in the Descartes Readme.md. If this is so, I suggest to add it. If this is described in another documentation available for UC testers, please, let me know. I will try your advice out.

from pitest-descartes.

danglotb avatar danglotb commented on June 10, 2024

You are welcome @jesus-gorronogoitia , thank to take the time to run descartes! :)

You can find a lot of configuration in the pit-test website.

Cheers! Good mutants hunt!

from pitest-descartes.

jesus-gorronogoitia avatar jesus-gorronogoitia commented on June 10, 2024

Are all pit-test Maven configurations applicable to Descartes?

from pitest-descartes.

oscarlvp avatar oscarlvp commented on June 10, 2024

As Descartes is only a PITest plugin, everything in their site also applies, except for their mutation operators. What Descartes brings is a new set of operators very different in behaviour. I think that PITest also takes into account the surefire configuration which is directly related with Maven.

from pitest-descartes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.