Search

Showing posts with label Testing. Show all posts
Showing posts with label Testing. Show all posts

13 August, 2018

How to use Python unit test module and it's methods?

Unit test module is an in-build library in python, used to write test scripts . It gives some helpful methods while helps us designing out test in a way , that emulates a real production environment.

While writing test, we need to keep these things in mind

1. Test should start with a clean slate. Meaning the subject under test must not hold any info or be in a state, that might affect the test results.

2. Every tests should test one and only one feature . Clubbing multiple tests in one test,  is a bad idea.

Unit test provides some special methods. These can be used to handle the flow of tests as per scenario. Below is a generic template of a unit test showing all methods and their tasks.

25 June, 2018

How to test POST call using Python?


I got into a situation recently where I needed to test if my POST function was indeed working. 
    Its easy to test GET method . You just visit the URL and that's it . But for POST, you an use Plugins. But unfortunately I can't do that , because my browser (admin restrictions ) doesn't allow me to install plugins . Fortunately if you have Python , you can easily do that .


29 May, 2018

SVN commands you must know as an Test Automation Engineer


In the course of automation and continuous integration , you will someday come across a stage where you have to perform svn operations . And obviously, using command line (forget fancy UIs to do your business) using command line. And then you will have to start digging in,  which will take a substantial amount time ...believe me.