I am trying to use pytest framework for testing However when i run the command from the terminal pytest test_Analysis.py -s -v it shows no test rans
Below are the snapshots for your reference.
Also if remove the constructor it run but gives me the error stating there is not driver attribute present
and if i keep the constructor it gives me an error as well below is the error for your reference.
CodePudding user response:
You do not need constructor method. You can follow below approach.
class TestAnalysis:
def test_navigate_to_analysis(self, apiuum_driver):
analysis = appium_driver.find_element(By.ID, 'id name')
analysis.click()
Instead of using apium_fixture from pytest.mark, you can refer it explicitly from the test method.



