diff --git a/README.md b/README.md index 22f36c439..30b7da7d4 100644 --- a/README.md +++ b/README.md @@ -150,3 +150,22 @@ The necessary solutions have to be built in the following order: 1. Open the Shell Solution 2. Choose "Shell" as the startup project 3. Run + +### Running FDC3 sikuli e2e tests +#### Prerequisite +1. Java version 8 or later + +#### IDE setup +1. [Download](https://launchpad.net/sikuli/+download) sikuli IDE jar file. +2. Launch the IDE with a double click on the sikuli IDE jar file + +#### Run tests from sikuli IDE +1. Launch [FDC3 Chart and Grid Example](####FDC3-Chart-and-Grid-Example) +2. On the Sikuli IDE click on file -> open +3. Locate the test file and select. +4. Click on the "Run" button in sikuli IDE to execute the script. Ensure that [FDC3 Chart and Grid Example](####FDC3-Chart-and-Grid-Example) is running in the background as Sikuli script will interact with it directly. + +#### Run tests from CLI +1. Launch [FDC3 Chart and Grid Example](####FDC3-Chart-and-Grid-Example) +2. Open your terminal and run `java -jar PATH-TO-SIKULI/sikuli-ide.exe -r PATH-TO-TEST_FILE` +3. Example `java -jar ./sikulixide-2.0.5-win.jar -r ./grid-and-chat-display-automated-test.py` \ No newline at end of file diff --git a/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/grid-and-chat-display-automated-test.py b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/grid-and-chat-display-automated-test.py new file mode 100644 index 000000000..2a609b3d2 --- /dev/null +++ b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/grid-and-chat-display-automated-test.py @@ -0,0 +1,20 @@ +try: + if exists("./screenshots/modules"): + click(Pattern("./screenshots/datagrid-button.png").similar(0.69)) + chart = wait("./screenshots/open-chart-button.png", 30) + click(chart) + if exists("./screenshots/chart-opened.png"): + wait(5) + click(Pattern("./screenshots/goog-symbol.png").exact()) + wait(10) + exit(0) + else: + popup("Chart not available to proceed") + exit(1) + else: + popup("Module not found, can't continue") + exit(1) +except FindFailed: + popup("test failed") + exit(1) + \ No newline at end of file diff --git a/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/chart-opened.png b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/chart-opened.png new file mode 100644 index 000000000..e161c1282 Binary files /dev/null and b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/chart-opened.png differ diff --git a/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/datagrid-button.png b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/datagrid-button.png new file mode 100644 index 000000000..d2d848435 Binary files /dev/null and b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/datagrid-button.png differ diff --git a/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/goog-symbol.png b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/goog-symbol.png new file mode 100644 index 000000000..e4d6027c1 Binary files /dev/null and b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/goog-symbol.png differ diff --git a/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/modules.png b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/modules.png new file mode 100644 index 000000000..9259da050 Binary files /dev/null and b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/modules.png differ diff --git a/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/open-chart-button.png b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/open-chart-button.png new file mode 100644 index 000000000..0f62be5e6 Binary files /dev/null and b/examples/fdc3-chart-and-grid/fdc3-chart-and-grid.sikuli/screenshots/open-chart-button.png differ