#8938: add sikuli scripts for gui test automation
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 23 Sep 2013 11:27:06 +0000 (13:27 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 25 Sep 2013 16:26:56 +0000 (18:26 +0200)
- added a first sikuli test case (needs some improvement: start
browser, navigate to url, ...)
- added install howto for ubuntu 12.10

https://forge.tine20.org/mantisbt/view.php?id=8938

Change-Id: I430d86b6c66175ec6b1e0e1925dd789427fab168
Reviewed-on: https://gerrit.tine20.org/tine20/2346
Tested-by: jenkins user
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tests/sikuli/login.sikuli/1379932428118.png [new file with mode: 0644]
tests/sikuli/login.sikuli/1379932466303.png [new file with mode: 0644]
tests/sikuli/login.sikuli/1379932483974.png [new file with mode: 0644]
tests/sikuli/login.sikuli/1379934818634.png [new file with mode: 0644]
tests/sikuli/login.sikuli/login.html [new file with mode: 0644]
tests/sikuli/login.sikuli/login.py [new file with mode: 0644]
tests/sikuli/sikuliHOWTOubuntu1210.txt [new file with mode: 0644]

diff --git a/tests/sikuli/login.sikuli/1379932428118.png b/tests/sikuli/login.sikuli/1379932428118.png
new file mode 100644 (file)
index 0000000..8de8709
Binary files /dev/null and b/tests/sikuli/login.sikuli/1379932428118.png differ
diff --git a/tests/sikuli/login.sikuli/1379932466303.png b/tests/sikuli/login.sikuli/1379932466303.png
new file mode 100644 (file)
index 0000000..9d4a1b5
Binary files /dev/null and b/tests/sikuli/login.sikuli/1379932466303.png differ
diff --git a/tests/sikuli/login.sikuli/1379932483974.png b/tests/sikuli/login.sikuli/1379932483974.png
new file mode 100644 (file)
index 0000000..4228b3a
Binary files /dev/null and b/tests/sikuli/login.sikuli/1379932483974.png differ
diff --git a/tests/sikuli/login.sikuli/1379934818634.png b/tests/sikuli/login.sikuli/1379934818634.png
new file mode 100644 (file)
index 0000000..4c2e029
Binary files /dev/null and b/tests/sikuli/login.sikuli/1379934818634.png differ
diff --git a/tests/sikuli/login.sikuli/login.html b/tests/sikuli/login.sikuli/login.html
new file mode 100644 (file)
index 0000000..538ac18
--- /dev/null
@@ -0,0 +1,81 @@
+
+<html>
+   <head>
+      <style type="text/css">
+         .sikuli-code {
+            font-size: 20px;
+            font-family: "Osaka-mono", Monospace;
+            line-height: 1.5em;
+            display:table-cell;
+            white-space: pre-wrap;       /* css-3 */
+            white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
+            white-space: -pre-wrap;      /* Opera 4-6 */
+            white-space: -o-pre-wrap;    /* Opera 7 */
+            word-wrap: break-word;       /* Internet Explorer 5.5+ */
+            width: 99%;   /* remove horizontal scroll-bar when viewing in IE7 */
+         }
+         .sikuli-code img {
+            vertical-align: middle;
+            margin: 2px;
+            border: 1px solid #ccc;
+            padding: 2px;
+            -moz-border-radius: 5px;
+            -webkit-border-radius: 5px;
+            -moz-box-shadow: 1px 1px 1px gray;
+            -webkit-box-shadow: 1px 1px 2px gray;
+         }
+         .kw {
+            color: blue;
+         }
+         .skw {
+            color: rgb(63, 127, 127);
+         }
+
+         .str {
+            color: rgb(128, 0, 0);
+         }
+
+         .dig {
+            color: rgb(128, 64, 0);
+         }
+
+         .cmt {
+            color: rgb(200, 0, 200);
+         }
+
+         h2 {
+            display: inline;
+            font-weight: normal;
+         }
+
+         .info {
+            border-bottom: 1px solid #ddd;
+            padding-bottom: 5px;
+            margin-bottom: 20px;
+            display: none;
+         }
+
+         a {
+            color: #9D2900;
+         }
+
+         body {
+            font-family: "Trebuchet MS", Arial, Sans-Serif;
+         }
+
+      </style>
+   </head>
+<body>
+<div class="info">
+<h2>login.sikuli</h2> <a href="login.zip">(Download this script)</a>
+</div>
+<pre class="sikuli-code">
+Region(<span class="dig">109</span>,<span class="dig">28</span>,<span class="dig">1022</span>,<span class="dig">712</span>)
+<span class="skw">click</span>(<img src="1379932428118.png" />)
+<span class="skw">type</span>(<span class="str">"unittest"</span>)
+<span class="skw">click</span>(<img src="1379932466303.png" />)
+<span class="skw">type</span>(<span class="str">"picola124"</span>)
+<span class="skw">click</span>(<img src="1379932483974.png" />)
+</pre>
+</body>
+</html>
diff --git a/tests/sikuli/login.sikuli/login.py b/tests/sikuli/login.sikuli/login.py
new file mode 100644 (file)
index 0000000..253bdcb
--- /dev/null
@@ -0,0 +1,6 @@
+Region(109,28,1022,712)
+click("1379932428118.png")
+type("unittest")
+click("1379932466303.png")
+type("picola124")
+click("1379932483974.png")
diff --git a/tests/sikuli/sikuliHOWTOubuntu1210.txt b/tests/sikuli/sikuliHOWTOubuntu1210.txt
new file mode 100644 (file)
index 0000000..8101eeb
--- /dev/null
@@ -0,0 +1,12 @@
+howto install sikuli-ide ubuntu 12.10:
+======================================
+
+$ wget https://launchpad.net/sikuli/sikulix/1.0.1/+download/sikuli-setup.jar
+$ java -jar sikuli-setup.jar (PACK 1)
+$ sudo add-apt-repository ppa:kubuntu-ppa/backports
+$ sudo apt-get update
+$ sudo apt-get install libtesseract3 libopencv-core2.4 libopencv-highgui2.4
+
+$ ./runIDE
+oder
+$ ./runIDE -d 3 -r ~/workspace/tine20/tests/sikuli/login.sikuli