My First Online Hackathon Submission

I built a test automation framework that uses Natural Language Understanding

Posted 2019-09-01 07:43:18 by Ronie Martinez

When I started working as an entry-level Software Engineer in 2013, my first project was to work with Python and Robot Framework, a popular test automation framework.

I have been the automated testing evangelist in my team for around 3 years. For this long, not a single developer became interested in test automation even though I have been teaching developers inside and outside my team how to use Robot Framework. Then I realized that the syntax of Robot Framework is still not very easy to use for anyone starting test automation.

For developers in my team, they would rather write a script in Java, etc. to do automated testing. Others just do manual testing and record everything in an excel file containing "God knows how many test cases are in there!".

A proposal to use Natural Language Processing

In 2015, I submitted a proposal to my manager, Jack, about a test framework that uses Natural Language Processing (NLP). This was the time when Artificial Intelligence (AI) became popular and NLP is gaining traction in this field. The idea was to allow anyone to do automated testing just by writing the instructions in their own sentence, no programing background needed. Who will not understand it if you just write the test instructions like this in a notepad?

Open chrome browser https://devpost.com
Page title should be "Devpost - The home for hackathons"
Page should contain link "About"
Click link "About"
Page title should be "About us · Devpost"
Close browser

At the time there was not enough tool available that is easy to use and cheap. Sadly, my proposal got ignored/rejected. I really believed that the idea was good so I kept it in my notes along with other crazy ideas and things that I have.

Sorry Jack, I am making it happen

It is 2019. AI and NLP tools are emerging both in the Open Source community and in the paid cloud services (you know what they are). It is very easy to make an idea happen now.

I started by naming my project, Human Framework. Familiar? The name was inspired by Robot Framework. It was not meant to compete with it. The goal was simply to tell users that it was written for Humans.

I started my project by working with Rasa NLU which is a very good Natural Language Processing tool and it is free and open source. I wrote several training data, but every time I introduce a new sentence, it fails because there was not enough training data. For a NLU to work properly you need hundreds to thousands of training data. Wit.ai is also one of my choices for this project. 

Microsoft Azure AI Hackathon

I am one of the developers who visit Devpost regularly and even subscribed to their newsletter. I stumbled upon their Microsoft Azure AI Hackathon and decided to join. At first, I planned on building the NLP backend on their service, probably using Rasa. Studying the ins and outs of the AI features of the Azure platform will require me a lot of time and it is not enough to finish the project. I decided to scrape the Rasa NLU branch and work on Microsoft LUIS, their pre-built intent classifier. Do not worry, I am still working on the Rasa support.

LUIS was really easy to use - training an application worked smoothly. It works even though I only have a few training data. Now I have an intent classifier for Human Framework.

Building the remaining parts

I built Human Framework's core using Python 3 - the reader for the intent-classifier, the action loader, and the report generator. For web testing, I used Selenium, because who does not? For HTML report generation, I used Bootstrap and Bootstrap-Table. Here is the high level architecture of how Human Framework works:

High Level Architecture

My entry submission day

It is August 31, 2019. Even though Human Framework is still incomplete and there is still that command prompt / terminal usage which is developer-centric, I decided to submit my entry since it is already working. Proof-of-Concept stage is a good stepping stone after all.

You can find my project here: https://devpost.com/software/human-framework-test-automation-framework-for-humans

Let us make it happen

Human Framework is far from being complete. I released Human Framework under GPLv3 license to make it free and open source for everyone. 

There are still a lot of things to do that are waiting in the backlog and more things that I might have not thought of:

  1. Supporting multiple languages - not all testers use English and I have a deadline :)
  2. Integrated Editor - no command-prompt or terminal
  3. Cheaper or Free NLU options - I am still trying to build the Rasa NLU backend, there are still other options there that are very popular.

If in some cases you have a free time and want to contribute, feel free to send a Pull Request (PR) on Github.

Hopefully, people will realize the impact of Human Framework to their software development projects and businesses.

PS: To the entrepreneurs out there, read this article, Automation Testing Market worth $19.27 Billion by 2023, and support Human Framework. 😊

python natural language processing natural languange understanding luis.ai intent-classifier


Share