5

I will be working on automating a small Web app and i choose python and webdriver(selenium) for doing it depending on my comfort on coding with python. I had read few articles about Page object design. But i am currently confused on which test framework to use. I have some familiarity with unittest. When i pose this question to my acquantainces i only get suggestions of doing it in Java/TestNG/Junit.

Is there any equivalent or close which i can use with python. If you could point out some differnces on the majorly used test framework in python, it will be great for me.

3

PyUnit - the standard unit testing framework for Python

This unit testing framework, dubbed 'PyUnit' by convention, is a Python language version of JUnit. JUnit was written by smart cookies Kent Beck and Erich Gamma, and is, in turn, a Java version of Kent's Smalltalk testing framework. Each is the de facto standard unit testing framework for its respective language, and therefore both are a strong basis for an effective and elegant Python framework.

  • 1
    Any personal feedback about it? – Nicolas Raoul Aug 2 '16 at 2:53
  • Good question (+1). I don't code Java, so haven't used JUNIT. However, I have had a lot of experience of its derivative sourceforge.net/projects/cppunit (and a little sourceforge.net/projects/cppunit, which is also derivative). There's a reason, of course, that they keep basing on Junit - it's good! Personally, I found CppUnit easy to learn, intuitive, in fact, way back then. Powerful, flexible ... it's a darn good tool. Having used it, PhpUnit just came naturally. I did try a few others (I forget which), but PhpUnit seemed the clear choice to me. – Mawg Aug 2 '16 at 7:37
  • 1
    py.test – ostrokach Nov 2 '16 at 22:04
0

Nose and proboscis are popular test frameworks for python. I have been using nose for the last 3 years for our projects. Nose provides easy to install and use features which can help with providing Coverage , html or xml reporting, logging and running tests is super simple with nose. You can install using this command on the command line : "pip install nose"

You can find the documentation for nose here "http://nose.readthedocs.io/en/latest/"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.