testcases:
-
name: healthcheck
+ criteria: 'status == "PASS"'
description: >-
This test case verifies the basic OpenStack services like
Keystone, Glance, Cinder, Neutron and Nova.
testcases:
-
name: vping_ssh
+ criteria: 'status == "PASS"'
description: >-
This test case verifies: 1) SSH to an instance using floating
IPs over the public network. 2) Connectivity between 2 instances
-
name: vping_userdata
+ criteria: 'status == "PASS"'
description: >-
This test case verifies: 1) Boot a VM with given userdata.
2) Connectivity between 2 instances over a private network.
-
name: tempest_smoke_serial
+ criteria: 'success_rate == 100%'
description: >-
This test case runs the smoke subset of the OpenStack
Tempest suite. The list of test cases is generated by
-
name: rally_sanity
+ criteria: 'success_rate == 100%'
description: >-
This test case runs a sub group of tests of the OpenStack
Rally suite in smoke mode.
testcases:
-
name: odl
+ criteria: 'success_rate == 100%'
description: >-
Test Suite for the OpenDaylight SDN Controller. It integrates
some test suites from upstream using Robot as the test
-
name: onos
+ criteria: 'status == "PASS"'
description: >-
Test Suite for the ONOS SDN Controller. It integrates
some test suites from upstream using TestON as the test
-
name: ovno
+ criteria: 'status == "PASS"'
description: >-
Test Suite for the Open Contrail SDN Controller.
framework.
testcases:
-
name: promise
+ criteria: 'success_rate == 100%'
description: >-
Test suite from Promise project.
dependencies:
-
name: doctor
+ criteria: 'status == "PASS"'
description: >-
Test suite from Doctor project.
dependencies:
-
name: bgpvpn
+ criteria: 'status == "PASS"'
description: >-
Test suite from SDNVPN project.
dependencies:
-
name: security_scan
+ criteria: 'status == "PASS"'
description: >-
Simple security Scan
dependencies:
testcases:
-
name: tempest_full_parallel
+ criteria: 'success_rate >= 80%'
description: >-
The list of test cases is generated by
Tempest automatically and depends on the parameters of
-
name: rally_full
+ criteria: 'success_rate >= 90%'
description: >-
This test case runs the full suite of scenarios of the OpenStack
Rally suite using several threads and iterations.
testcases:
-
name: vims
+ criteria: 'status == "PASS"'
description: >-
This test case deploys an OpenSource vIMS solution from Clearwater
using the Cloudify orchestrator. It also runs some signaling traffic.
testcase = th.TestCase(name=dic_testcase['name'],
dependency=dep,
+ criteria=dic_testcase['criteria'],
description=dic_testcase['description'])
if testcase.is_compatible(self.ci_installer, self.ci_scenario):
tier.add_test(testcase)
class TestCase:
- def __init__(self, name, dependency, description=""):
+ def __init__(self, name, dependency, criteria, description=""):
self.name = name
self.dependency = dependency
self.description = description
+ self.criteria = criteria
def is_compatible(self, ci_installer, ci_scenario):
try:
def get_name(self):
return self.name
+ def get_criteria(self):
+ return self.criteria
+
def __str__(self):
lines = split_text(self.description, LINE_LENGTH - 6)
out += ("| Description:".ljust(LINE_LENGTH - 1) + "|\n")
for line in lines:
out += ("| " + line.ljust(LINE_LENGTH - 7) + " |\n")
+ out += ("| Criteria: " +
+ self.criteria.ljust(LINE_LENGTH - 14) + "|\n")
out += ("| Dependencies:".ljust(LINE_LENGTH - 1) + "|\n")
installer = self.dependency.get_installer()
scenario = self.dependency.get_scenario()
return sg_id
-def push_results(start_time_ts, duration, test_status):
+def push_results(start_time_ts, duration, status):
try:
logger.debug("Pushing result into DB...")
scenario = functest_utils.get_scenario(logger)
version = functest_utils.get_version(logger)
criteria = "failed"
- if test_status == "OK":
+ test_criteria = functest_utils.get_criteria_by_test("vping_ssh")
+ if eval(test_criteria): # evaluates the regex 'status == "PASS"'
criteria = "passed"
pod_name = functest_utils.get_pod_name(logger)
build_tag = functest_utils.get_build_tag(logger)
criteria, build_tag,
payload={'timestart': start_time_ts,
'duration': duration,
- 'status': test_status})
+ 'status': status})
except:
logger.error("Error pushing results into Database '%s'"
% sys.exc_info()[0])
logger.debug("Pinging %s. Waiting for response..." % test_ip)
sec += 1
- test_status = "NOK"
+ test_status = "FAIL"
if EXIT_CODE == 0:
logger.info("vPing OK")
- test_status = "OK"
+ test_status = "PASS"
else:
duration = 0
logger.error("vPing FAILED")
import urllib2
import yaml
from git import Repo
+import functest.ci.tier_builder as tb
+
+
+""" global variables """
+REPOS_DIR = os.getenv('repos_dir')
+FUNCTEST_REPO = ("%s/functest/" % REPOS_DIR)
# ----------------------------------------------------------
deployment_dir = (rally_dir + "/tempest/for-deployment-" +
deployment_uuid)
return deployment_dir
+
+
+def get_criteria_by_test(testname):
+ criteria = ""
+ file = FUNCTEST_REPO + "/ci/testcases.yaml"
+ tiers = tb.TierBuilder("", "", file)
+ for tier in tiers.get_tiers():
+ for test in tier.get_tests():
+ if test.get_name() == testname:
+ criteria = test.get_criteria()
+
+ return criteria