From 69fe5baee1cfb9f55c798620dda3151eab700bc7 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Tue, 31 May 2016 11:39:51 +0200 Subject: Add criteria in testcases.yaml and Test class JIRA: FUNCTEST-257 Added example of usage in vping_ssh Change-Id: Iac143b811db163f0f86682b0688948c20843ede5 Signed-off-by: jose.lausuch --- ci/testcases.yaml | 15 +++++++++++++++ ci/tier_builder.py | 1 + ci/tier_handler.py | 8 +++++++- 3 files changed, 23 insertions(+), 1 deletion(-) (limited to 'ci') diff --git a/ci/testcases.yaml b/ci/testcases.yaml index 4cbc00add..4281f73ce 100644 --- a/ci/testcases.yaml +++ b/ci/testcases.yaml @@ -9,6 +9,7 @@ tiers: testcases: - name: healthcheck + criteria: 'status == "PASS"' description: >- This test case verifies the basic OpenStack services like Keystone, Glance, Cinder, Neutron and Nova. @@ -26,6 +27,7 @@ tiers: 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 @@ -36,6 +38,7 @@ tiers: - 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. @@ -45,6 +48,7 @@ tiers: - 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 @@ -56,6 +60,7 @@ tiers: - 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. @@ -73,6 +78,7 @@ tiers: 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 @@ -83,6 +89,7 @@ tiers: - 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 @@ -93,6 +100,7 @@ tiers: - name: ovno + criteria: 'status == "PASS"' description: >- Test Suite for the Open Contrail SDN Controller. framework. @@ -110,6 +118,7 @@ tiers: testcases: - name: promise + criteria: 'success_rate == 100%' description: >- Test suite from Promise project. dependencies: @@ -118,6 +127,7 @@ tiers: - name: doctor + criteria: 'status == "PASS"' description: >- Test suite from Doctor project. dependencies: @@ -126,6 +136,7 @@ tiers: - name: bgpvpn + criteria: 'status == "PASS"' description: >- Test suite from SDNVPN project. dependencies: @@ -134,6 +145,7 @@ tiers: - name: security_scan + criteria: 'status == "PASS"' description: >- Simple security Scan dependencies: @@ -149,6 +161,7 @@ tiers: 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 @@ -159,6 +172,7 @@ tiers: - 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. @@ -175,6 +189,7 @@ tiers: 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. diff --git a/ci/tier_builder.py b/ci/tier_builder.py index 4723bf4fa..b9357bc2d 100644 --- a/ci/tier_builder.py +++ b/ci/tier_builder.py @@ -48,6 +48,7 @@ class TierBuilder: 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) diff --git a/ci/tier_handler.py b/ci/tier_handler.py index b1ef52d8f..20a47e997 100644 --- a/ci/tier_handler.py +++ b/ci/tier_handler.py @@ -102,10 +102,11 @@ class Tier: 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: @@ -124,6 +125,9 @@ class TestCase: 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) @@ -134,6 +138,8 @@ class TestCase: 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() -- cgit 1.2.3-korg