Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Package improvements #9

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

Merged
merged 2 commits into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions Dockerfile_build
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN mvn package

FROM ubuntu:16.04
COPY --from=builder /code/target/javafxlibrary-*-SNAPSHOT-jar-with-dependencies.jar /.
COPY --from=builder /code/target/javafxlibrary-*-SNAPSHOT-tests.jar /.
COPY entrypoint_build.sh /.
RUN apt-get -qq update && apt-get dist-upgrade -y && apt-get install -qq --no-install-recommends --allow-unauthenticated -y \
openjdk-8-jre \
Expand Down
6 changes: 4 additions & 2 deletions docker/robot-javafx-demo/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ function local() {
echo "**********************"
echo "INFO: Local execution:"
file=$(ls -1 /javafxbinary/javafxlibrary-*-jar-with-dependencies.jar)
java -cp ${file} org.robotframework.RobotFramework -d /robot/results/local --include smoke $@ /robot/acceptance
testJar=$(ls -1 /javafxbinary/javafxlibrary-*-tests.jar)
java -cp ${file} org.robotframework.RobotFramework -d /robot/results/local --include smoke --variable appJar:${testJar} $@ /robot/acceptance
# $@ #just to testing script
if [[ "$?" != "0" ]]; then
EXIT_VALUE=$((EXIT_VALUE+1))
Expand All @@ -15,7 +16,8 @@ function local() {
function remote() {
echo "***********************"
echo "INFO: Remote execution:"
robot -d /robot/results/remote --include smoke $@ /robot/acceptance
testJar=$(ls -1 /javafxbinary/javafxlibrary-*-tests.jar)
robot -d /robot/results/remote --include smoke --variable appJar:${testJar} $@ /robot/acceptance
# $@ #just to testing script
if [[ "$?" != "0" ]]; then
EXIT_VALUE=$((EXIT_VALUE+2))
Expand Down
3 changes: 2 additions & 1 deletion entrypoint_build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
rm -rvf /javafxbinary/*
cp -vf /javafxlibrary-*-jar-with-dependencies.jar /javafxbinary/.
chmod 555 /javafxbinary/javafxlibrary-*-jar-with-dependencies.jar
cp -vf /javafxlibrary-*-tests.jar /javafxbinary/.
chmod 555 /javafxbinary/*
java -jar /javafxlibrary-*-jar-with-dependencies.jar
45 changes: 41 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,33 @@
</execution>
</executions>
</plugin>
<!-- Upload also documentation -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.artifactId}.html</file>
<type>html</type>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}.xml</file>
<type>xml</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand Down Expand Up @@ -138,6 +165,11 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
Expand Down Expand Up @@ -219,6 +251,9 @@
</excludes>
<logLevel>TRACE:INFO</logLevel>
<dryrun>false</dryrun>
<variables>
<variable>appJar:${project.build.directory}/${project.artifactId}*tests.jar</variable>
</variables>
</configuration>
</execution>
<execution>
Expand All @@ -229,6 +264,7 @@
</goals>
<configuration>
<libdoc>
<outputDirectory>${project.build.directory}</outputDirectory>
<outputFile>${project.artifactId}.html</outputFile>
<libraryOrResourceFile>JavaFXLibrary</libraryOrResourceFile>
<version>${project.version}</version>
Expand All @@ -243,6 +279,7 @@
</goals>
<configuration>
<libdoc>
<outputDirectory>${project.build.directory}</outputDirectory>
<outputFile>${project.artifactId}.xml</outputFile>
<libraryOrResourceFile>JavaFXLibrary</libraryOrResourceFile>
<version>${project.version}</version>
Expand Down Expand Up @@ -299,7 +336,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>3.3.9</version>
<version>3.6.0</version>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
Expand All @@ -315,7 +352,7 @@
<dependency>
<groupId>org.testfx</groupId>
<artifactId>testfx-core</artifactId>
<version>4.0.14-alpha</version>
<version>4.0.15-alpha</version>
</dependency>
<dependency>
<groupId>org.testfx</groupId>
Expand All @@ -331,7 +368,7 @@
<dependency>
<groupId>org.robotframework</groupId>
<artifactId>robotframework</artifactId>
<version>3.0.2</version>
<version>3.0.4</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
Expand All @@ -341,7 +378,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>23.0</version>
<version>27.0.1-jre</version>
</dependency>
<dependency>
<groupId>com.github.ombre42</groupId>
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/JavaFXLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public class JavaFXLibrary extends AnnotationLibrary {
public JavaFXLibrary() {
super(includePatterns);
deleteScreenshotsFrom("report-images/imagecomparison");
//v4.0.15-alpha sets default robot as glass, which breaks rolling
//Forcing usage of awt robot as previous versions
System.setProperty("testfx.robot", "awt");
}

@Autowired
Expand Down
4 changes: 4 additions & 0 deletions src/test/robotframework/resource.robot
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
*** Variables ***
${appJar} javafxlibrary-*-tests.jar

*** Keywords ***
Import JavaFXLibrary
Run Keyword If sys.platform.startswith('java') Import Library JavaFXLibrary
... ELSE Import Library Remote http://javafxcompile:8270 WITH NAME RemoteJavaFXLibrary
Set To Classpath ${appJar}

Disable Embedded Image Logging For Negative Tests
:FOR ${tag} IN @{TEST TAGS}
Expand Down