Skip to content

Commit

Permalink
(sakuli/sakuli-ocr#7) Added e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
svettwer committed Dec 15, 2020
1 parent b1692db commit 7982839
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .test/e2e/e2e-ocr/ocr/ocr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(async () => {
const testCase = new TestCase("OCR");
const url = "https://sakuli.io/e2e-pages/sandbox/#";
try {
await testCase.startStep("Navigate to website");
await _navigateTo(url);
await _wait(2000);

await testCase.startStep("find 'element in one place'");
await _getRegionByText("element in one place").highlight(1);
} catch (e) {
await testCase.handleException(e);
} finally {
await testCase.saveResult();
}
})();
4 changes: 4 additions & 0 deletions .test/e2e/e2e-ocr/testsuite.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testsuite.id=ocr
testsuite.browser=chrome
#log.level=debug
selenium.chrome.arguments=--incognito --disable-dev-shm-usage --no-sandbox
1 change: 1 addition & 0 deletions .test/e2e/e2e-ocr/testsuite.suite
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ocr/ocr.js https://sakuli.io
8 changes: 8 additions & 0 deletions .test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,11 @@ docker run \
--shm-size=2G \
taconsol/sakuli:${1:-latest}

# OCR run
docker run \
--rm \
-e SAKULI_LICENSE_KEY=${SAKULI_LICENSE_KEY} \
-e SAKULI_TEST_SUITE=/sakuli-project/e2e-ocr \
-v $(pwd)/e2e:/sakuli-project \
--shm-size=2G \
taconsol/sakuli:${1:-latest}

0 comments on commit 7982839

Please sign in to comment.