GithubHelp home page GithubHelp logo

Comments (7)

Stephan202 avatar Stephan202 commented on June 15, 2024

Hey @punkratz312! If I'm reading the screenshots right, you're using JUnit 5, but without the pitest-junit5-plugin. Can you try adding it?

from pitest.

punkratz312 avatar punkratz312 commented on June 15, 2024

Thank you @Stephan202

I have already tried that before without success:

pitest-junit5-plugin:

image

Project has no tests, it is empty:
image

test-classes:
image

pitest-parent:
image

pitest:
image

from pitest.

hcoles avatar hcoles commented on June 15, 2024

The error message is misleading/wrong.

The problem is that the 'e2e-acceptance-tests' project has no production code to mutate, only test code.

from pitest.

punkratz312 avatar punkratz312 commented on June 15, 2024

Thank you for the hint @hcoles. That is kind of true, as the target code (to mutate) lives in another module and not directly in the executing 'e2e-acceptance-tests'-module. The code is still included and referred as a dependency.

Included and hopefully accessable for mutation:
image

Is therefore the byte code mutation not possible?
image

from pitest.

hcoles avatar hcoles commented on June 15, 2024

Pitest doesn't support tests in a seperate module than the code under tests. From the name of the module, it sounds like these tests would not be suitable for mutation testing anyway. For practical reasons, mutation testing requires fast running unit tests. As a fundamental implementation detail, pitest requires tests that run in the same JVM as the code under test. This is often not the case for "end to end" tests that communicate with the code under test via http.

from pitest.

punkratz312 avatar punkratz312 commented on June 15, 2024

Thank you for the update; appreciate it. Perhaps a more precise error message would be helpful in making things clearer.

from pitest.

punkratz312 avatar punkratz312 commented on June 15, 2024

Seems to work fine with the end-to-end (E2E) stack. Yes, indeed, the tests actually only test the app black box over the web interface, just like the real client would do.

Still, achieving 100% line coverage with this method on a normal check:

image

This tremendous tool, Pitest, is capable of testing with this high-level approach as well as with normal unit tests, which is maybe what it was designed for in the first place.

Now it's actually the same code, all within one project. Thanks a lot!

image

from pitest.

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.