Skip to main content

Testing the transform

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,

Comments

Popular posts from this blog

Summarizing Summer

It was a great pleasure to work with great coders/developers at Plone Foundation and learning a lot from them during the course of the program. This blog is about summarizing the whole work I have done during this summer under Google summer of code 2016 under Plone Foundation. So my project mainly focuses on improving forms in plone for dexterity. We already have forms in plone for archetype. So there is a project named collective.easyform which basically provide forms for Plone as dexterity contenttype. The main focus of the project was to improve that code base. Make this stable for plone 5.0 and above. Make all the test cases passing for the code base. Try to cover tests as much as possible code base. Also implement functionalities for fields/actions of the forms in correct place. Make the plone more user friendly. Finally for users who want to migrate their already present forms in Plone Form Gen (PFG) which is archetype to easyforms which are dexterity based forms Plone. This w...

How it started ..

In this blog I will share my experience how I approached for GSOC and my experience with plone in past few months. I had a great time while working with plone and I am learning a lot of new technologies with plone. People here in plone are really helpful and supportive and helped me a lot during my interaction with them. The journey was too good and full of surprises, success and defeat at different part of the journey. Journey Starts... After getting results for last year I have decided that I will give a try for GSOC next year, but at that point of time I had no Idea what I will do, How I will do and how will I proceed. Then During September I started looking for the organization that have been selected last year for the GSOC on the melange site. At first things were alien to me and I rarely understand anything on that site. I started reading about different organizations and and their projects. I mainly concentrated on organizations that involves python in it. Finall...