This repository has been archived by the owner on Oct 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from ISTIC-M2-ILa-GM/dev
Initial release
- Loading branch information
Showing
67 changed files
with
2,773 additions
and
100 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
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,19 @@ | ||
language: java | ||
|
||
jdk: oraclejdk8 | ||
|
||
addons: | ||
sonarcloud: | ||
organization: istic-m2-ila-gm | ||
token: | ||
secure: e/yARBIuHIJXfRySzbSLWAeIu652kaZ8ElWZyavAB5XBZlpJX4AneV5jXBGRtlAnka77KaR1uL9f/pE3Itnchvdz1P12VFWTxFWkNFe2c4Ms0zkieAdAF//4k8p81G6mfKP8y4U0Jf2dqjj3+SNc4Dn2aoYZvL2mcpT0hPQiY4wjlE6qI12A72IfnUDgR6zr28qw7IkPho6LLwac8Qk3lL8qNJ2n6gP2OX05YsmSSv+XRAxZ5EpTwEg4HCsiB8ziqixFhaih4UcIfJ2q6OS/y1j3cdpwL11EgSrvvz104a8jj77hcKx/IAPRUFGYnb8N3DGm9fNgMviZdR8hgWBFWbRc7CHNo9L0PJVHUe/T8TTSeisKz/Id67KLw8nBS9eQUE3/ljuEN9HcvQLB2uwNWYIodLYgjougax9VyVft/0zlcLaKjYUhFpGkpmsEToST8/++CbB8UeYGZX8G7Dn6gtib0iD+Cl1Lcz0ZcAn+nvWXbL8Ix+WXSRqkhJk9gmR5RCUpPI3cFspS9t82ey0DYrzEbH9mh+1o8sVvkRp+xExU5PuAdKdCY7pz+a4/f2ulsktpfbH5cxUly+NQHDtVt654xj/rfW6UhEmD5DFJR7OrAlnuYAIzsjQkeI4e3X131kOWJ+BiLb0ZuHZ4b0v7RiboVEwo5/zcyymUZZcsMq8= | ||
|
||
cache: | ||
directories: | ||
- "$HOME/.m2/repository" | ||
- "$HOME/.sonar/cache" | ||
|
||
jobs: | ||
include: | ||
- script: cd fake && mvn test && cd .. && mvn -B org.jacoco:jacoco-maven-plugin:prepare-agent verify && sonar-scanner | ||
name: Unit & Quality |
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 |
---|---|---|
@@ -1 +1,47 @@ | ||
# WeAssert | ||
# WeAssert | ||
|
||
## Project Status | ||
|
||
[![Build Status](https://travis-ci.org/ISTIC-M2-ILa-GM/WeAssert.svg?branch=dev)](https://travis-ci.org/ISTIC-M2-ILa-GM/WeAssert) | ||
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=fr.istic.gm.weassert&metric=code_smells)](https://sonarcloud.io/dashboard?id=fr.istic.gm.weassert) | ||
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=fr.istic.gm.weassert&metric=coverage)](https://sonarcloud.io/dashboard?id=fr.istic.gm.weassert) | ||
|
||
## Links | ||
|
||
* Subject: https://github.com/Software-Testing/Projects-2018-2019 | ||
* Project: https://github.com/ISTIC-M2-ILa-GM/WeAssert/projects/1 | ||
* Issues and Features TODO: https://github.com/ISTIC-M2-ILa-GM/WeAssert/issues | ||
* Continuous integration - Travis CI: https://travis-ci.org/ISTIC-M2-ILa-GM/WeAssert | ||
* Quality - Sonarcloud: https://sonarcloud.io/dashboard?id=fr.istic.gm.weassert | ||
|
||
## Build | ||
``` | ||
mvn compile | ||
``` | ||
This project needs to be installed to can be used: | ||
``` | ||
mvn install | ||
``` | ||
For a quicker install you can skip tests: | ||
``` | ||
mvn install -DskipTests | ||
``` | ||
|
||
## Execute the jar | ||
``` | ||
java -jar weassert.jar | ||
``` | ||
|
||
## How to use the project | ||
|
||
* Start the application, | ||
* On the GUI: | ||
* Select maven executable, | ||
* Select the project, | ||
* Click on generate button, | ||
* Click on run tests, | ||
* Select test and see modified code. | ||
|
||
## Tested projects | ||
|
||
* we-assert-fake-test |
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,135 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<groupId>fr.istic.gm</groupId> | ||
<artifactId>we-assert-fake-test</artifactId> | ||
<version>1.0</version> | ||
<modelVersion>4.0.0</modelVersion> | ||
<name>FakeProject</name> | ||
|
||
<inceptionYear>2018</inceptionYear> | ||
|
||
<organization> | ||
<name>GM</name> | ||
<url>https://github.com/ISTIC-M2-ILa-GM</url> | ||
</organization> | ||
|
||
<developers> | ||
<developer> | ||
<id>mlh</id> | ||
<name>Gwenole LE HENAFF</name> | ||
</developer> | ||
<developer> | ||
<id>grl</id> | ||
<name>Gautier Rouleau</name> | ||
</developer> | ||
</developers> | ||
|
||
<properties> | ||
<java.version.source>1.8</java.version.source> | ||
<java.version.target>1.8</java.version.target> | ||
<maven-compiler.version>3.1</maven-compiler.version> | ||
<maven-assembly.version>3.1.0</maven-assembly.version> | ||
<maven-clean.version>3.1.0</maven-clean.version> | ||
<maven-dependency.version>2.4</maven-dependency.version> | ||
<maven-surefire-plugin.version>2.19</maven-surefire-plugin.version> | ||
<build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version> | ||
<jacoco.version>0.8.2</jacoco.version> | ||
|
||
<slf4j.version>1.7.25</slf4j.version> | ||
<lombok.version>1.18.2</lombok.version> | ||
|
||
<junit4.version>4.12</junit4.version> | ||
<hamcrest.version>1.3</hamcrest.version> | ||
<mockito.core.version>2.22.0</mockito.core.version> | ||
<podam.version>7.2.0.RELEASE</podam.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- Lombok --> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>${lombok.version}</version> | ||
</dependency> | ||
|
||
<!-- SLF4J --> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>${slf4j.version}</version> | ||
</dependency> | ||
|
||
<!-- Junit --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>${junit4.version}</version> | ||
</dependency> | ||
|
||
<!-- TEST Dep --> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-all</artifactId> | ||
<version>${hamcrest.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>${mockito.core.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>uk.co.jemos.podam</groupId> | ||
<artifactId>podam</artifactId> | ||
<version>${podam.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>${maven-surefire-plugin.version}</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${maven-compiler.version}</version> | ||
<configuration> | ||
<source>${java.version.source}</source> | ||
<target>${java.version.target}</target> | ||
<showWarnings>true</showWarnings> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
<version>${jacoco.version}</version> | ||
<configuration> | ||
<excludes> | ||
<exclude>**/config/**</exclude> | ||
<exclude>**/*Exception.java</exclude> | ||
<exclude>**/*Configuration.java</exclude> | ||
</excludes> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>prepare-agent</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>report</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>report</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
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,17 @@ | ||
package fr.istic.gm.weassert.fake; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* A fake class Person to test the projet | ||
*/ | ||
@Data | ||
public class Person { | ||
|
||
private String name; | ||
private int age; | ||
|
||
public boolean isAdult() { | ||
return age >= 18; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
fake/src/test/java/fr/istic/gm/weassert/fake/PersonTest.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,21 @@ | ||
package fr.istic.gm.weassert.fake; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertFalse; | ||
|
||
/** | ||
* A fake Test class to try to generate assert | ||
*/ | ||
public class PersonTest { | ||
|
||
@Test | ||
public void testAge() { | ||
|
||
Person p = new Person(); | ||
p.setAge(13); | ||
p.setName("name"); | ||
|
||
assertFalse(p.isAdult()); | ||
} | ||
} |
Oops, something went wrong.