aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/samples
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-02-28 11:51:16 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-02-28 15:23:07 +0100
commit76097ed108f7ac2ff8ecd69f3174bb086e0fe939 (patch)
tree4b641e2314dc7b1759d6794bd0bac43d8cc50af5 /xtesting/samples
parent0d96b05b0a8d21ce90fc7a7e1768a87fa0e3260f (diff)
Publish Dockerfile and samples
Change-Id: Ie776fea631f04bb42d8ae80bc658318d8644d0e5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/samples')
-rw-r--r--xtesting/samples/HelloWorld.txt3
-rw-r--r--xtesting/samples/__init__.py0
-rw-r--r--xtesting/samples/first.py24
-rw-r--r--xtesting/samples/fourth.py19
-rw-r--r--xtesting/samples/second.py19
-rw-r--r--xtesting/samples/testcases.yaml66
6 files changed, 131 insertions, 0 deletions
diff --git a/xtesting/samples/HelloWorld.txt b/xtesting/samples/HelloWorld.txt
new file mode 100644
index 00000000..721c452b
--- /dev/null
+++ b/xtesting/samples/HelloWorld.txt
@@ -0,0 +1,3 @@
+*** Test Cases ***
+HelloWorld
+ Log ${var01} ${var02}
diff --git a/xtesting/samples/__init__.py b/xtesting/samples/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/xtesting/samples/__init__.py
diff --git a/xtesting/samples/first.py b/xtesting/samples/first.py
new file mode 100644
index 00000000..60de3dc6
--- /dev/null
+++ b/xtesting/samples/first.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2016 Orange and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# pylint: disable=missing-docstring
+
+import time
+
+from xtesting.core import testcase
+
+
+class Test(testcase.TestCase):
+
+ def run(self, **kwargs):
+ self.start_time = time.time()
+ print "Hello World"
+ self.result = 100
+ self.stop_time = time.time()
+ return testcase.TestCase.EX_OK
diff --git a/xtesting/samples/fourth.py b/xtesting/samples/fourth.py
new file mode 100644
index 00000000..be104fda
--- /dev/null
+++ b/xtesting/samples/fourth.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2016 Orange and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# pylint: disable=missing-docstring
+
+import unittest
+
+
+class TestStringMethods(unittest.TestCase):
+
+ def test_upper(self):
+ self.assertEqual('Hello World'.upper(),
+ 'HELLO WORLD')
diff --git a/xtesting/samples/second.py b/xtesting/samples/second.py
new file mode 100644
index 00000000..36e1dd33
--- /dev/null
+++ b/xtesting/samples/second.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2016 Orange and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# pylint: disable=missing-docstring
+
+from xtesting.core import feature
+
+
+class Test(feature.Feature):
+
+ def execute(self, **kwargs):
+ print "Hello World"
+ return 0
diff --git a/xtesting/samples/testcases.yaml b/xtesting/samples/testcases.yaml
new file mode 100644
index 00000000..86b0d279
--- /dev/null
+++ b/xtesting/samples/testcases.yaml
@@ -0,0 +1,66 @@
+tiers:
+ -
+ name: samples
+ order: 1
+ ci_loop: 'daily'
+ description : ''
+ testcases:
+ -
+ case_name: first
+ project_name: xtesting
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: ''
+ dependencies:
+ installer: ''
+ scenario: ''
+ run:
+ module: 'first'
+ class: 'Test'
+
+ -
+ case_name: second
+ project_name: xtesting
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: ''
+ dependencies:
+ installer: ''
+ scenario: ''
+ run:
+ module: 'second'
+ class: 'Test'
+
+ -
+ case_name: third
+ project_name: xtesting
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: ''
+ dependencies:
+ installer: ''
+ scenario: ''
+ run:
+ module: 'xtesting.core.feature'
+ class: 'BashFeature'
+ args:
+ cmd: 'echo -n Hello World; exit 0'
+
+ -
+ case_name: fourth
+ project_name: xtesting
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: ''
+ dependencies:
+ installer: ''
+ scenario: ''
+ run:
+ module: 'xtesting.core.unit'
+ class: 'Suite'
+ args:
+ name: 'fourth'