confused about the report result

733 views
Skip to first unread message

jiqia...@gmail.com

unread,
Jun 19, 2018, 2:50:49 AM6/19/18
to PIT Users

Hi all:

i wrote the exactly same code follow the video "Introduction to Mutation Testing - Nicolas Fränkel", but still get different result . 

I'm using: 1,Oxygen.3a Release (4.7.3a) 2,TestNG 6.14.0.201802161500 3,Pitclipse 1.1.6.201607050705 -- Default Mutators


1
package com;
2
3
public class PassFilter {
4
5
	private int  limit;
6
	public PassFilter(int limit) {
7
		this.limit=limit;
8
	}
9
	public boolean filter(int i) {
104
		return i < limit;
11
	}
12
}

Mutations

10

1. changed conditional boundary → SURVIVED

2. negated conditional → SURVIVED

3. replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

4. replaced return of integer sized value with (x == 0 ? 1 : 0) → SURVIVED


public class PassFilterTest {
private PassFilter passFileterFive;
@BeforeMethod
protected void setup() {passFileterFive = new PassFilter(5);}
@Test
public void test01() {
boolean result = passFileterFive.filter(1);
Assert.assertTrue(result);
}
@Test
public void test02() {
boolean result = passFileterFive.filter(10);
Assert.assertFalse(result);
}
@Test
public void test03() {
boolean result = passFileterFive.filter(5);
Assert.assertFalse(result);
}
}

===============================================
com.PassFilterTest
Total tests run: 3, Failures: 1, Skips: 2
===============================================

stderr  : 14:39:58 PIT >> FINE : Mutation MutationIdentifier [location=Location [clazz=com.PassFilter, method=filter, methodDesc=(I)Z], indexes=[8], mutator=org.pitest.mutationtest.engine.gregor.mutators.ReturnValsMutator] detected = KILLED by com.PassFilterTest._

....

===============================================
com.PassFilterTest
Total tests run: 3, Failures: 0, Skips: 3
===============================================

...
stderr  : 14:39:58 PIT >> FINE : Mutation MutationIdentifier [location=Location [clazz=com.PassFilter, method=filter, methodDesc=(I)Z], indexes=[6], mutator=org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator] detected = SURVIVED
...

===============================================
com.PassFilterTest
Total tests run: 3, Failures: 0, Skips: 3
===============================================

stderr  : 14:39:58 PIT >> FINE : Mutation MutationIdentifier [location=Location [clazz=com.PassFilter, method=filter, methodDesc=(I)Z], indexes=[6], mutator=org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator] detected = SURVIVED

...

===============================================
com.PassFilterTest
Total tests run: 3, Failures: 0, Skips: 3
===============================================

stderr  : 14:39:58 PIT >> FINE : Mutation MutationIdentifier [location=Location [clazz=com.PassFilter, method=filter, methodDesc=(I)Z], indexes=[6], mutator=org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator] detected = SURVIVED
stderr  : 14:39:58 PIT >> FINE : processed mutation in 18 ms.



jiqia...@gmail.com

unread,
Jun 22, 2018, 3:14:21 AM6/22/18
to PIT Users
later i try to use PIT in maven, and it works , guess the Pitclipse is not stable now.

在 2018年6月19日星期二 UTC+8下午2:50:49,jiqia...@gmail.com写道:

yuva raja

unread,
Apr 29, 2020, 3:12:56 AM4/29/20
to PIT Users
I am also getting same set of reports .. For any test class , one method is getting killed others are getting survived by skipping .. Exactly how you mentioned above.. did you fix the issue? I am using maven only

Stefan

unread,
May 3, 2020, 3:15:34 PM5/3/20
to pitu...@googlegroups.com

Hi guys,


I tried to reproduce the issue but couldn't. Pitest kills all mutants as expected. Can you create a github sample project from your sources and provide a link to it? Maybe I'm doing something different when reproducing your sample.


Regards,

Stefan


Am 29.04.20 um 09:12 schrieb yuva raja:
--
You received this message because you are subscribed to the Google Groups "PIT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pitusers+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pitusers/cac0a9a2-64c3-4e51-821b-615475221744%40googlegroups.com.

yuva raja

unread,
May 5, 2020, 7:10:21 AM5/5/20
to PIT Users
Hi ,

Thank you for your reply. I have fixed , thats issue on my side.

Now  I am facing some other issue.

Pit Test Increment analysis is not working.

pom set up:

<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.4.11</version>
<configuration>
<testPlugin>testng</testPlugin>
<verbose>true</verbose>
<features>
<value>+EXPORT</value>
</features>
<targetClasses>
<param>com.dt.appservice.*</param>
</targetClasses>
<historyInputLocation>${project.basedir}\\test-output\\PitestHistory\\history.txt</historyInputLocation>
<historyOutputLocation>${project.basedir}\\test-output\\PitestHistory\\history.txt</historyOutputLocation>
<targetTests>
<param>com.dt..service.*</param>
</targetTests>
</configuration>
</plugin>

It is creating history file  but not referring  for next run.. When I am running same set of files without  any modifications, It is taking same time. No performance improvement.

I have tried histroyInputFile instead of historyInputLocation, thats also did not work.

could  you someone assist me on this?
To unsubscribe from this group and stop receiving emails from it, send an email to pitu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages