Hi sphinx-users,
maybe I have a weird requirements or more like a question whether the following is possible using sphinx.
I'm using Python code to define testcases using a predefined testing framework (pyATS).
So within this framework, test cases are defined as Python classes with multiple test steps as methods within this class. Example
class myTestCase1(aetest.Testcase):
@aetest.test
def myTestStep1(self):
#... Test code
@aetest.test
def myTestStep2(self):
#... Test code
class myTestCase2(aetest.Testcase):
# ...
So I don't really need to document classes in the usual way, because there are no arguments etc. It's more like a container class.
What I like to achive is a "human readable" Test Case documentation from the code.
If using the example from above:
class myTestCase1(aetest.Testcase):
''' myTestCase1
:test-purpose: The purpose of this test is to check whether spiderman is cool.
:test-environment: Please refer to <LINK>
:test-description: Ask 100 people if spiderman is cool
:test-expected-results: At least 51 people think that spiderman is cool
'''
@aetest.test
def myTestStep1(self):
#... Test code
@aetest.test
def myTestStep2(self):
#... Test code
class myTestCase2(aetest.Testcase):
# ...
Hope you get the point... So I want to generate a document (preferably a markdown document) based on a jinja2 template, where I can access the definitions from above like :test-description:
Is something like this achivable using sphinx?