Quality Testing

Quality is delighting customers

Can anyone please suggest a good testing Framework in Python?

Can anyone please suggest a good testing Framework in Python?

Views: 14

Reply to This

Replies to This Discussion

According to software testing company, the best Testing Framework used in Python nowadays is PyTest which is a Python based testing framework used to write and execute test cases.

The main advantages of using this framework are:-

  • It is the latest framework being used in the market.
  • It gives very neat failure information just by the use of option '-s' while running.It rewrites the whole test case and tells where actually the assertion failed.
  • Using Pytest, we don't need any sort of boilerplate code that we have in unittest(Another Testing Framework).
  • PyTest is able to run a specific test or a subset of tests(groups).
  • PyTest can detect tests automatically with file names of the format test_* or *_test.
  • We can skip tests as per our requirements using various annotations like @pytest.mark.skip or @pytest.mark.xfail.
  • We can use fixtures(methods that run before each test function to which they have been applied) in PyTest to control our testing flow.
  • Concept of hooks can be used to enter a command line option in the code. Like we can mention browser name in that hook and then select the browser at run time to execute the test cases. 
  • We can run multiple test cases in parallel using pytest-xdist plugin.
  • PyTest is free and open source.

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service