forked from EvoSuite/evosuite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.0.0
- Loading branch information
Showing
7 changed files
with
170 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
name: Upload custom evosuite jar | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'release/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- run: mvn package -e -B -DskipTests=true | ||
- run: zip -j release master/target/evosuite-master-*-SNAPSHOT.jar | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./release.zip | ||
asset_name: release.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
master/src/main/java/org/evosuite/utils/CompactReport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.evosuite.utils; | ||
|
||
import java.io.Serializable; | ||
import java.util.HashMap; | ||
import java.util.Set; | ||
|
||
import org.evosuite.result.BranchInfo; | ||
import org.evosuite.result.MutationInfo; | ||
import org.evosuite.result.TestGenerationResultImpl; | ||
|
||
public class CompactReport implements Serializable { | ||
public String UUT; | ||
public String testSuiteCode; | ||
public Set<Integer> allCoveredLines; | ||
public Set<Integer> allUncoveredLines; | ||
public Set<BranchInfo> allCoveredBranches; | ||
public Set<BranchInfo> allUncoveredBranches; | ||
public Set<MutationInfo> allCoveredMutation; | ||
public Set<MutationInfo> allUncoveredMutation; | ||
|
||
public HashMap<String, CompactTestCase> testCaseList; | ||
|
||
public CompactReport(TestGenerationResultImpl<?> testGenerationResult) { | ||
this.allCoveredLines = testGenerationResult.getCoveredLines(); | ||
this.UUT = testGenerationResult.getClassUnderTest(); | ||
this.testSuiteCode = testGenerationResult.getTestSuiteCode(); | ||
this.testCaseList = CompactTestCase.buildTestCaseList(testGenerationResult); | ||
this.allUncoveredLines = testGenerationResult.getUncoveredLines(); | ||
this.allCoveredBranches = testGenerationResult.getCoveredBranches(); | ||
this.allUncoveredBranches = testGenerationResult.getUncoveredBranches(); | ||
this.allCoveredMutation = testGenerationResult.getCoveredMutants(); | ||
this.allUncoveredMutation = testGenerationResult.getUncoveredMutants(); | ||
} | ||
} | ||
|
50 changes: 50 additions & 0 deletions
50
master/src/main/java/org/evosuite/utils/CompactTestCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package org.evosuite.utils; | ||
|
||
import java.io.Serializable; | ||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
import java.util.Set; | ||
import org.evosuite.coverage.mutation.Mutation; | ||
import org.evosuite.result.BranchInfo; | ||
import org.evosuite.result.MutationInfo; | ||
import org.evosuite.result.TestGenerationResultImpl; | ||
import org.evosuite.testcase.TestCase; | ||
|
||
public class CompactTestCase implements Serializable { | ||
public String testName; | ||
public String testCode; | ||
public Set<Integer> coveredLines; | ||
public Set<BranchInfo> coveredBranches; | ||
public Set<MutationInfo> coveredMutants; | ||
|
||
public CompactTestCase(String testName, String testCode, Set<Integer> coveredLines, Set<BranchInfo> coveredBranches, Set<MutationInfo> coveredMutants) { | ||
this.testName = testName; | ||
this.testCode = testCode; | ||
this.coveredLines = coveredLines; | ||
this.coveredBranches = coveredBranches; | ||
this.coveredMutants = coveredMutants; | ||
} | ||
|
||
public static HashMap<String, CompactTestCase> buildTestCaseList(TestGenerationResultImpl<?> testGenerationResult) { | ||
HashMap<String, CompactTestCase> map = new HashMap<>(); | ||
|
||
Set<String> keySet = testGenerationResult.getTestCaseKeySet(); | ||
|
||
for(String key: keySet){ | ||
TestCase testCase = testGenerationResult.getTestCase(key); | ||
// see what is exposed by TestCase | ||
String testCode = testGenerationResult.getTestCode(key); | ||
Set<Integer> coveredLines = testGenerationResult.getCoveredLines(key); | ||
Set<BranchInfo> coveredBranches = testGenerationResult.getCoveredBranches(key); | ||
Set<MutationInfo> coveredMutants = testGenerationResult.getCoveredMutants(key); | ||
|
||
CompactTestCase compactTestCase = new CompactTestCase(key, testCode, coveredLines, coveredBranches, coveredMutants); | ||
map.put(key, compactTestCase); | ||
} | ||
|
||
|
||
return map; | ||
} | ||
|
||
|
||
} |