Hello everyone, now the transform for filtering html is ready and the main task is to test the transform. For that purpose I have set up the whole test environment for my add-on using testing.py for unit tests and robot tests.
After setting up the environment, now its time to first write unit test for transform that we have just created to check if they are all passing and the transform is working properly or not.
For creating unit test I first created test class and in that class I just call the convert function that we have created in the transform and give the input as a data stream and pass it to convert function and then get the output as required. After writing few simple test cases like 30-35 then just ran these test cases and they ran successfully.
Test cases ran successfully locally :-
Travis is also happy ;)
Yayayay!!! Finally test cases were passing so its like a milestone for the project and its completed. The PR got merged and things working good as expected.
Now its time to write more test cases and write robot test to pass the whole html page for the script and get the required output, though I tried that on script manually and it ran perfectly and now its time to write them in automated test form so that we can check them with just one command and to check if the transform is working perfectly or not.
Though these last two weeks were too pathetic as I was busy with the placement season and it helped as I got placed.
In the next blog I will write about how I implemented the robot test for the transform. Stay tunned.
Hope you enjoy!!
cheers,
After setting up the environment, now its time to first write unit test for transform that we have just created to check if they are all passing and the transform is working properly or not.
For creating unit test I first created test class and in that class I just call the convert function that we have created in the transform and give the input as a data stream and pass it to convert function and then get the output as required. After writing few simple test cases like 30-35 then just ran these test cases and they ran successfully.
Test cases ran successfully locally :-
Travis is also happy ;)
Yayayay!!! Finally test cases were passing so its like a milestone for the project and its completed. The PR got merged and things working good as expected.
Now its time to write more test cases and write robot test to pass the whole html page for the script and get the required output, though I tried that on script manually and it ran perfectly and now its time to write them in automated test form so that we can check them with just one command and to check if the transform is working perfectly or not.
Though these last two weeks were too pathetic as I was busy with the placement season and it helped as I got placed.
In the next blog I will write about how I implemented the robot test for the transform. Stay tunned.
Hope you enjoy!!
cheers,
Comments
Post a Comment