Java Exercises
Local test
Project file tree
You should have retrieved the following file tree:
/home/user
|_gitlabciintroduction
|_java
|_ pom.xml
|_ src
|_ main
| |_ java
| |_ fr
| |_ inria
| |_ sed
| |_ Sphere.java
|_ tst
|_ java
|_ fr
|_ inria
|_ sed
|_ TestSphere.java
The project is made up of :
- A Maven Project Object Model file named pom.xml
- A file Sphere.java implementing the class Sphere
- A file SphereTest.java implementing its test class SphereTest.
For more information about Maven, please refer to this Maven user introduction Enter the java folder and build the project:
$ cd java
$ mvn compile
# You should see these lines (among others) :
[INFO] Compiling 1 source file to /home/user/gitlabciintroduction/java/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.880 s
[INFO] Finished at: 2019-09-03T13:50:26Z
[INFO] ------------------------------------------------------------------------
$ mvn test
# You should see something like
T E S T S
-------------------------------------------------------
Running fr.inria.sed.SphereTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.093 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
Home | Java Home | << Java Previous - Branch creation | >> Java Next - GitLab CI setup