pytest-spiratest - how to obtain test case id of test within Class

Tuesday, November 27, 2018

Here is part of my spira.cfg:

test_example = 1
TestClass.test_example = 2

The problem is ConfigParser set all capital letters to lowercase by default. Therefore It's not possible to obtain test case id of TestClass.test_example within pytest-spiratest, because config["test_case_ids"] contains lowercase testclass.test_example.

if test_name in config["test_case_ids"]:
    test_case_id = config["test_case_ids"][test_name]
    test_case_id = config["test_case_ids"]["default"]


1 Replies
Wednesday, November 28, 2018
re: johnny_t Tuesday, November 27, 2018

Fixed by modifying pytest-spiratest package

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885


  • Started: Tuesday, November 27, 2018
  • Last Reply: Wednesday, November 28, 2018
  • Replies: 1
  • Views: 4712