stryker-net icon indicating copy to clipboard operation
stryker-net copied to clipboard

Allow mutating transitive project references.

Open Kuinox opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. First I recommend this blogposts about testing: https://blog.7mind.io/constructive-test-taxonomy.html For these reason, I prefer to do E2E/Integrations tests over unit tests when possible and cost efficient, to reduce maintenance cost.

Doing this lead thats some internal libraries are mostly indirectly tested through the test suit. Intermediary projects are both tested by their own unit tests, and by the tests of their dependents.

Furthermor, segmenting code into multiples assembly is a common thing to do, and a single projects hardly ever hits 100% coverage with it's test suit.

Allowing transitive project reference to be mutated would allow to run the whole test suit on it, and benefit from a far greater coverage than it's own unit test.

Describe the solution you'd like Allow mutating transitive project references.

Describe alternatives you've considered I can write a tool that explicitly add the project dependency before running the command, but I prefer when things run without hacks like this :p.

Kuinox avatar Oct 29 '21 00:10 Kuinox

We have this exact problem with .NET projects. We usually split the code into multiple projects and add project references. Here is a sample project:

- Common
- Infrastructure
- WebApi
    References:
    > Infrastructure
        > Common
    > Common
- WebApi.IntegrationTests <---- These test have around 90% code coverage
    References:
    > WebApi

Note this feature might be included in these issues?

  • https://github.com/stryker-mutator/stryker-net/pull/1039
  • https://github.com/stryker-mutator/stryker-net/issues/459

stiasta avatar Mar 04 '22 09:03 stiasta

How would we know where to stop transitively resolving projects under test?

@stiasta the solution runs implementation does not help you, because we make a mapping for test project -> source project based on project references.

I don't think this is something we can support, because it's a giant rabbit hole to fall in. If a test project tests a given source project, add the project reference and the problem is solved. Explicit > Transitive in this case. It doesn't cost you anything either as those references are perfectly legal.

rouke-broersma avatar Nov 25 '22 13:11 rouke-broersma

How would we know where to stop transitively resolving projects under test?

With an user provided list, or pattern for example.

Kuinox avatar Nov 27 '22 21:11 Kuinox

I don't think that is something we will support, sorry.

rouke-broersma avatar Nov 28 '22 09:11 rouke-broersma