Package tlib :: Package base :: Module SpiraModerator :: Class SpiraModerator |
[hide private]
[frames] | no frames]

# Class SpiraModerator

source code

    object --+
             |
            SpiraModerator

Helper class to connect and manipulate the data in SpiraTest

Instance Methods | [hide private]
__init__(self, _logger) Constructor for class | source code
test_connect(self) Authenticates client with SpiraTest. | source code
connect(self) Authenticates client with SpiraTest. | source code
update_test_case(self, project_id, test_case_id, test_start, test_end, test_status_id, runner_msg, stack_trace, test_set_id) Updates a specified test cases with a specified projects Automation test set with the results of the test execution | source code
get_project_id(self, proj_name) Gets the Unique prject id from spiratest for a given project name. | source code
get_tests_from_set(self, test_set_id, proj_id) Fetches a list of test cases for a given test set id in SpiraTest and stores them in class var "tests" | source code
get_test_case_id(self, test_name) Gets the unique test case id from SpiraTest for the test case name supplied | source code
get_test_steps(self, test_case_id) Gets the Test Steps for a Test Case | source code
get_expected_result(self, test_case_id) Gets the Expected Result of the last Test Step for a test case | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
| client = `None` Soap client to connect to Spira Soap API
| my_soap = `None`
| _tests = `None` Holds retrieved tests from Automation test set in Spiratest
| _logger = `None` logger to send loggin information to.
| _username = ``'``ypgAutoTester``'``
| _password = ``'``@ut0t3$t3r``'``

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, _logger) (Constructor) | source code
Constructor for class Args : _logger : (logger) instance of a logging object configured in testing project Overrides: object.__init__

### test_connect(self) | source code
Authenticates client with SpiraTest. Returns : (bool) if connection was successful

### connect(self) | source code
Authenticates client with SpiraTest. Returns : (bool) if connection was successful

### update_test_case(self, project_id, test_case_id, test_start, test_end, test_status_id, runner_msg, stack_trace, test_set_id) | source code
Updates a specified test cases with a specified projects Automation test set with the results of the test execution Args : project_id : (int) Unique project id from within SpiraTest test_case_id : (int) Unique test case id from within SpiraTest test_start : (datetime) Time at which the test case started its execution. Doesn't seem to affect Spiratest. test_end : (datetime) Time at which the test case ended its execution. Doesn't seem to affect Spiratest. runner_msg : (str) Parameters that were used in test execution stack_trace : (str) Error message returned from failed test cases

### get_project_id(self, proj_name) | source code
Gets the Unique prject id from spiratest for a given project name. Name comes from project's config file Args : proj_name : (str) Name of project under test Returns : (int) project id

### get_tests_from_set(self, test_set_id, proj_id) | source code
Fetches a list of test cases for a given test set id in SpiraTest and stores them in class var "tests" Args : test_set_id : (int) Automation test set id from Spiratest for project under test proj_id : (int) project id from Spiratest for project under test

### get_test_case_id(self, test_name) | source code
    Gets the unique test case id from SpiraTest for the test case name supplied

    Args : testName : (str) Test case name found in SpiraTest and used in test case decorated to label
                        automated test_support

    Returns : (int) test case id

### get_test_steps(self, test_case_id) | source code
Gets the Test Steps for a Test Case Args : test_case_id : (int) Test Case ID from the SpiraTest Returns : (array) test steps including Test Description. Expected Results and Test Data

### get_expected_result(self, test_case_id) | source code
Gets the Expected Result of the last Test Step for a test case Args : test_case_id : (int) Test Case ID from the SpiraTest Returns : (str) expected test step result in plain text

Class Variable Details | [hide private]

  ### _logger logger to send loggin information to. Logger comes from pytest test definitions Value:
      None