Skip to content

Commit 9bb86f6

Browse files
committed
2 parents 88902d4 + 4d533ab commit 9bb86f6

File tree

12 files changed

+31
-19
lines changed

12 files changed

+31
-19
lines changed

docker-compose.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ services:
55
build:
66
context: ./docker/robot-javafx-demo
77
ports:
8-
- '5900:5900'
8+
#- '5900:5900'
9+
- '80:80'
910
volumes:
1011
- './src/test/robotframework/:/robot'
1112
- screen-thing:/tmp/.X11-unix
1213
- './src/:/src' # ScreenCapturingTest.robot require this.
1314
- javafxbinaryshare:/javafxbinary
1415
networks:
1516
- testapp
17+
environment:
18+
- RESOLUTION=1920x1080
1619

1720
javafxcompile:
1821
build:
@@ -27,7 +30,7 @@ services:
2730
- screen-thing:/tmp/.X11-unix
2831
- javafxbinaryshare:/javafxbinary
2932
environment:
30-
- DISPLAY=:20.0
33+
- DISPLAY=:1
3134

3235
# javafxrelease:
3336
# build:

docker/robot-javafx-demo/Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM dorowu/ubuntu-desktop-lxde-vnc
22

33
ENV DEBIAN_FRONTEND noninteractive
44

@@ -21,12 +21,14 @@ RUN apt-get -qq update && apt-get dist-upgrade -y && apt-get install -qq --no-i
2121
openjfx \
2222
&& apt-get clean && rm -rf /var/lib/apt/lists/*
2323

24+
COPY test.sh /bin/test.sh
2425
RUN pip install --no-cache-dir \
25-
robotframework
26+
robotframework && chmod 555 /bin/test.sh
2627

27-
COPY entrypoint.sh /entrypoint.sh
28-
COPY test.sh /bin/test.sh
29-
RUN mkdir ~/.vnc && x11vnc -storepasswd 1234 ~/.vnc/passwd && chmod 555 /entrypoint.sh /bin/test.sh
30-
EXPOSE 5900
28+
# JUST VNC
29+
#COPY entrypoint.sh /entrypoint.sh
30+
#RUN mkdir ~/.vnc && x11vnc -storepasswd 1234 ~/.vnc/passwd && chmod 555 /entrypoint.sh /bin/test.sh
31+
#ENTRYPOINT ["x11vnc", "-create", "-forever", "-env", "FD_PROG=/entrypoint.sh", "-env", "X11VNC_CREATE_GEOM=${1:-1024x768x16}", "-usepw"]
3132

32-
ENTRYPOINT ["x11vnc", "-create", "-forever", "-env", "FD_PROG=/entrypoint.sh", "-env", "X11VNC_CREATE_GEOM=${1:-1024x768x16}", "-usepw"]
33+
EXPOSE 5900 80
34+
ENTRYPOINT ["/startup.sh"]

src/main/java/javafxlibrary/testapps/controllers/ImageDemoController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public class ImageDemoController implements Initializable {
3232

3333
private @FXML TextField search;
3434
private @FXML VBox rowWrapper;
35-
private List<File> files;
35+
//private List<File> files;
3636
private List<File> imageFiles;
3737
private List<ImageFile> images;
3838

3939
@Override
4040
public void initialize(URL location, ResourceBundle resources) {
41-
File folder = new File("src/main/resources/ScreenCapturing/comparison");
42-
files = Arrays.asList(folder.listFiles());
43-
imageFiles = new ArrayList<>(files);
41+
//File folder = new File("src/main/resources/ScreenCapturing/comparison");
42+
//files = Arrays.asList(folder.listFiles());
43+
imageFiles = new ArrayList<>(/*files*/);
4444
imageFiles.add(new File("src/main/resources/fxml/javafxlibrary/ui/uiresources/ejlogo.png"));
4545
images = new ArrayList<>();
4646
Collections.shuffle(imageFiles);

src/test/robotframework/acceptance/ScreenCapturingTest.robot

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
*** Settings ***
2-
Documentation Tests to test javafxlibrary.keywords.ScreenCapturing related keywords
3-
Resource ../resource.robot
4-
Suite Setup Setup all tests
5-
Suite Teardown Teardown all tests
6-
Force Tags set-screencapturing
2+
Documentation Tests to test javafxlibrary.keywords.ScreenCapturing related keywords
3+
Library String
4+
Resource ../resource.robot
5+
Suite Setup Setup all tests
6+
Suite Teardown Teardown all tests
7+
Force Tags set-screencapturing
78
89
*** Variables ***
910
${TEST_APPLICATION} javafxlibrary.testapps.TestScreenCapturing
10-
${COMPARISON} src/main/resources/screencapturing/comparison/
11+
${COMPARISON} ${EMPTY}
1112
1213
*** Test Cases ***
1314
Capture Node
@@ -95,6 +96,12 @@ Setup all tests
9596
Set Timeout 0
9697
Launch Javafx Application ${TEST_APPLICATION}
9798
Set Screenshot Directory ${OUTPUT_DIR}${/}report-images
99+
Set comparison path
98100
99101
Teardown all tests
100102
Close Javafx Application
103+
104+
Set comparison path
105+
${dir_path} Fetch From Left ${CURDIR} acceptance
106+
${comparison_path} Catenate SEPARATOR= ${dir_path} resources/screencapturingtest/
107+
Set Suite Variable ${COMPARISON} ${comparison_path}

0 commit comments

Comments
 (0)