Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update the documentation with updated options from DSpot #996

Merged
merged 2 commits into from
Oct 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions dspot-diff-test-selection/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![Build Status](https://travis-ci.org/STAMP-project/diff-test-selection.svg?branch=master)](https://travis-ci.org/STAMP-project/diff-test-selection) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/eu.stamp-project/diff-test-selection/badge.svg)](https://mavenbadges.herokuapp.com/maven-central/eu.stamp-project/diff-test-selection)
# diff-test-selection
# diff-test-selection · [![Build Status](https://travis-ci.org/STAMP-project/diff-test-selection.svg?branch=master)](https://travis-ci.org/STAMP-project/diff-test-selection) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/eu.stamp-project/diff-test-selection/badge.svg)](https://mavenbadges.herokuapp.com/maven-central/eu.stamp-project/diff-test-selection)

Diff-Test-Selection aims at selecting the subset of test classes and methods that execute the changed code between two versions of the same program. It relies on Clover and Maven to compute the coverage and returns this subset of tests.

Expand Down Expand Up @@ -94,24 +93,24 @@ This is done with one single command line as follow:

```bash
mvn clean eu.stamp-project:dspot-diff-test-selection:list \
-Dpath-dir-second-version="../tavern-refactor" \
eu.stamp-project:dspot-maven:amplify-unit-tests \
-Dpath-to-test-list-csv=testsThatExecuteTheChange.csv \
-Dverbose -Dtest-criterion=ChangeDetectorSelector \
-Dpath-to-properties=src/main/resources/tavern.properties \
-Damplifiers=NumberLiteralAmplifier -Diteration=2
-Dpath-dir-second-version="../tavern-refactor" \
eu.stamp-project:dspot-maven:amplify-unit-tests \
-Dpath-to-test-list-csv=testsThatExecuteTheChange.csv \
-Dverbose -Dtest-criterion=ChangeDetectorSelector \
-Dabsolute-path-to-second-version=`pwd`/../tavern-refactor \
-Damplifiers=NumberLiteralAmplifier -Diteration=2
```

This results in on the standard output:

```text
======= REPORT =======
5 amplified test fails on the new versions.
testlitNum10litNum158(fr.inria.stamp.MainTest): expected:<Seller{gold=[-2147483548], items=[Potion]}> but was:<Seller{gold=[100], items=[Potion]}>
testlitNum11litNum117(fr.inria.stamp.MainTest): expected:<...ayer{gold=0, items=[[Potion]]}> but was:<...ayer{gold=0, items=[[]]}>
testlitNum16litNum107(fr.inria.stamp.MainTest): expected:<Seller{gold=[-2147483548], items=[Potion]}> but was:<Seller{gold=[100], items=[Potion]}>
testlitNum15litNum155(fr.inria.stamp.MainTest): expected:<Seller{gold=[-2147483549], items=[Potion]}> but was:<Seller{gold=[100], items=[Potion]}>
testlitNum9litNum210(fr.inria.stamp.MainTest): expected:<Seller{gold=[-2147483549], items=[Potion]}> but was:<Seller{gold=[100], items=[Potion]}>
testlitNum18litNum149(fr.inria.stamp.MainTest): expected:<Player{gold=[0, items=[Potion]]}> but was:<Player{gold=[2147483647, items=[]]}>
testlitNum14litNum132(fr.inria.stamp.MainTest): expected:<...ayer{gold=0, items=[[Potion]]}> but was:<...ayer{gold=0, items=[[]]}>
testlitNum19litNum169(fr.inria.stamp.MainTest): expected:<Player{gold=[0, items=[Potion]]}> but was:<Player{gold=[-2147483648, items=[]]}>
testlitNum12litNum179(fr.inria.stamp.MainTest): expected:<Player{gold=[0, items=[Potion]]}> but was:<Player{gold=[2147483647, items=[]]}>
testlitNum13litNum197(fr.inria.stamp.MainTest): expected:<Player{gold=[0, items=[Potion]]}> but was:<Player{gold=[-2147483648, items=[]]}>
```

This means that DSpot obtained 5 amplified test methods that detect the regression.
Expand Down