Skip to content

Commit

Permalink
Fixed various files for setting up project
Browse files Browse the repository at this point in the history
  • Loading branch information
William Kvaale committed Feb 1, 2018
1 parent d2ef5bd commit 2931ab2
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 26 deletions.
7 changes: 5 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,21 @@ build-job:
stage: build
script:
- "mvn clean compile -f tdt4140-gr1802/pom.xml $MAVEN_CLI_OPTS"
# - "mvn clean compile -f tdt4140-gr1800/pom.xml $MAVEN_CLI_OPTS"

unittest-job:
stage: test
dependencies:
- build-job
script:
- "mvn package -f tdt4140-gr1802/pom.xml $MAVEN_CLI_OPTS"
- "cat tdt4140-gr1802/app.core/target/site/jacoco/index.html"
# - "mvn package -f tdt4140-gr1800/pom.xml $MAVEN_CLI_OPTS"
# - "cat tdt4140-gr1800/app.core/target/site/jacoco/index.html"

integrationtest-job:
stage: test
dependencies:
- build-job
script:
- "mvn verify -f tdt4140-gr1802/pom.xml $MAVEN_CLI_OPTS"
- "mvn verify -f tdt4140-gr18nn/pom.xml $MAVEN_CLI_OPTS"
# - "mvn verify -f tdt4140-gr1800/pom.xml $MAVEN_CLI_OPTS"
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package tdt4140.gr1802.app.core;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

public class TestExample extends TestCase {

public TestExample( String testName)
{
super( testName );
}

public static Test suite() {
return new TestSuite(TestExample.class);
}

public void testApp() {
assertTrue(true);
}

}
27 changes: 26 additions & 1 deletion tdt4140-gr1802/app.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@
<artifactId>tdt4140-gr1802</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>

<profiles>
<profile>
<id>gitlab-ci</id>
<activation>
<property>
<name>gitlab-ci</name>
<value>true</value>
</property>
</activation>
<!--
<properties>
<skip-ui-tests>true</skip-ui-tests>
</properties>
-->
<dependencies>
<dependency>
<groupId>org.testfx</groupId>
<artifactId>openjfx-monocle</artifactId>
<version>8u76-b04</version> <!-- jdk-9+181 for Java 9 -->
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>

<dependencies>
<dependency>
Expand Down Expand Up @@ -36,4 +61,4 @@
</dependency>
</dependencies>

</project>
</project>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package tdt4140.gr1802.app.ui;

import org.junit.BeforeClass;
import org.junit.Test;
import org.testfx.framework.junit.ApplicationTest;

Expand All @@ -9,6 +10,21 @@
import javafx.stage.Stage;

public class FxAppTest extends ApplicationTest {

@BeforeClass
public static void headless() {
if (Boolean.valueOf(System.getProperty("gitlab-ci", "false"))) {
System.setProperty("prism.verbose", "true"); // optional
System.setProperty("java.awt.headless", "true");
System.setProperty("testfx.robot", "glass");
System.setProperty("testfx.headless", "true");
System.setProperty("glass.platform", "Monocle");
System.setProperty("monocle.platform", "Headless");
System.setProperty("prism.order", "sw");
System.setProperty("prism.text", "t2k");
System.setProperty("testfx.setup.timeout", "2500");
}
}

@Override
public void start(Stage stage) throws Exception {
Expand All @@ -21,4 +37,4 @@ public void start(Stage stage) throws Exception {
@Test
public void testFxApp() {
}
}
}

0 comments on commit 2931ab2

Please sign in to comment.