1 # Copyright 2015-2017 Intel Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 """IntegrationTestCase class
19 from collections import OrderedDict
20 from testcases import TestCase
22 class IntegrationTestCase(TestCase):
23 """IntegrationTestCase class
26 def __init__(self, cfg):
27 """ Testcase initialization
29 self._type = 'integration'
30 super(IntegrationTestCase, self).__init__(cfg)
31 self._logger = logging.getLogger(__name__)
32 # enforce check of step result for step driven testcases
33 self._step_check = True
36 """ Report test results
39 tmp_results = OrderedDict()
40 tmp_results['status'] = 'OK' if self._step_status['status'] else 'FAILED'
41 tmp_results['details'] = self._step_status['details']
42 self._tc_results = [tmp_results]
44 super(IntegrationTestCase, self).run_report()
46 self.step_report_status("Test '{}'".format(self.name), self._step_status['status'])
47 # inform vsperf about testcase failure
48 if not self._step_status['status']:
51 super(IntegrationTestCase, self).run_report()