Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

Right now I have several Python Selenium scripts in which I am manually writing results to a text file. Is there a more standardized / centralized way I can log my results without much difficulty?

I googled around but only see complicated setups involving specific technologies, like integrating into Nant. I just want a logging system that will allow me to review test results in a central place when I kick off multiple .py files.

Thanks.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

I suggest doing a Google search for "Python unit testing framework". A good unit testing framework will provide a way to log test results.

Alternatively, you could do a Google search for "python logging package", which would reveal APIs for generic, non-test-specific logging. If you have further questions about Python logging packages, I suggest posting your question in StackOverflow rather than here; while there are surely people here who know about that subject, there will be many, many more in StackOverflow.

share|improve this answer
    
Thanks. I'm going to spend today reading about unittest and nose. Links for people who may come across this thread in the future: docs.python.org/library/unittest.html readthedocs.org/docs/nose/en/latest –  Aaron Oct 11 '11 at 17:38
    
I do prefer nose over pyunit or separately logging the verification steps –  Suchit Parikh Aug 6 '13 at 1:18
add comment

You can launch each of your test jobs as a separate job with the Jenkins CI server. Jenkins can render a HTML report for each of your JUnit .xml test results that are generated. I'd say that is the quickest/easiest way to do it. Obviously, if you are using Py.Test or Nose, you will get this sort of output.

If you don't use that method , then you need to code something with the framework you are using, or with the build tool you are using (Gradle, Ant, or Maven).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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