question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exclude mutator for class or method

See original GitHub issue

How to exclude some mutator by name for method, class or package?

Since the latest version of ROR mutations survive for trivial code: ... if (this.isValid()) ...

  1. equal to less or equal → SURVIVED

I would like to exclude a mutation for the method, because changing the test code to kill this mutation seems strange to me. Maybe I misunderstand something…

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
rnveachcommented, May 13, 2019

Google translate:

I’m sorry for the late reply. I think you are right - this is a bad idea. My original problem was also solved - the mutation probably survived during testing with the beta version of JUnit. I think this issue should be closed.

0reactions
apoorva-srivcommented, May 10, 2021

How to exclude some mutator by name for method, class or package?

Since the latest version of ROR mutations survive for trivial code: ... if (this.isValid()) ...

  1. equal to less or equal → SURVIVED

I would like to exclude a mutation for the method, because changing the test code to kill this mutation seems strange to me. Maybe I misunderstand something…

Thanks!

@maxgabut @rnveach I’m getting the same mutation surviving for a similar if condition: if Object.isNull(var). Is PIT 1.6.5 replacing var == null with var <= null? If so, that should be a compilation error, right, and hence ignored by PIT? Isn’t this a bug?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignore mutations - Stryker Mutator
Ignore mutations option​. Every occurrence of a specific mutation type can be ignored using the ignore mutations option. "stryker-config" ...
Read more >
Mutation operators - PIT Mutation Testing
The non void method call mutator removes method calls to non void methods. Their return value is replaced by the Java Default Value...
Read more >
No accessor method and mutator method - java - Stack Overflow
1.My mutator have to be for each individual variable instead of all the variable at once. 2.My sub-class needs accessor and mutator method...
Read more >
5.5. Mutator Methods — AP CSAwesome - Runestone Academy
A mutator method is often a void method that changes the values of instance variables or static variables. 5.5.4. AP Practice¶. 5-5-6: Consider...
Read more >
How-to Guides - Infection PHP
How to disable Mutators and profiles · Disable Mutator · Disable Profile · Disable in particular class or method or line · Do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found