AI based BDD automation

AI based BDD automation

Code - Low Code - No Code Hybrid Architecture

·

4 min read

Yes, finally started to write this topic.

This is one of my works, which is in the development stage. when I started during the completion of my one year in the IT industry as a Software tester or Quality assurance engineer, whatever you name it.

So, what is special about this topic and subtitle?

Code, which already everyone knows, but talk of the town may be Low or No code. Then what's this hybrid architecture?

Let me give a walkthrough of my planned architecture.

Visual Representation

architecture-image.png

Flow of work

Let's go from very basic. Below is a single programming point of view.

  1. User giving command for automation like "Open chrome browser". It is then passed to the Text processing API as a request.

  2. Once text processing is done it'll give a response as intent like "Browser_open_operation".

  3. It is then passed to the respective programming framework i.e the request came from. After that control will enter the conditional flow for the Browser opening operation and a predefined browser launching code will be executed.

  4. There is an intermediate file between the test scripts and the base class. It controls the BDD execution and handles the parameters in text scripts.

This is at a very basic level.

At the advanced level,

  1. Text/BDD-based script files from a certain language framework are passed to BDD script processing API. It is nothing but making it easy like preprocessing the script file, separating BDD texts and passing it to text-processing API.

  2. Then from the text-processing API, we'll get intent or commands which is normal BDD text converted to framework understanding commands in a file.

  3. That file will be sent by API as a response and executed by the respective framework to start the automation execution.

What is text processing API?

Initially, it was a part of code from my college project. It is an open-source code for intent recognition, widely available on the internet for free.

First, we need to prepare the dataset. Then train the model with that data set to use it in Automation. Local code is very difficult to set up for all PCs.

Hence deploying it in an online platform with an endpoint to connect API to send and receive responses. With that endpoint, we can connect it to all frameworks (mentioned in the above picture), hence we can achieve AI-based BDD automation in all languages.

What Code - Low Code - No Code?

Code means working with code like a normal automation framework.

Low code, can be a combination of BDD-based frameworks when users use respective intermediary methods linking BDD with Code and in the middle pure coding can also be added.

No code is, as of now, most of the automation's operations can be done via text/BDD scripts which is nothing but normal English language.

The combination of the above makes it a hybrid architecture framework.

Key Outcomes

  1. True BDD (Behaviour Driven Development) with help of AI is achieved.

  2. Common AI API is shared between Java, Python, Javascript, Csharp and Ruby languages, so BDD can be easily used in the above programming languages.

  3. No other libraries like cucumber are needed.

  4. The users who don't need BDD or some logic cannot be attained by BDD can go for normal programming with help of a hybrid approach.

  5. All Language based frameworks can run independently with or without API, making it giving all choices to end users whether they want to write code in usual programming like java or BDD scripts or a combination of both.

  6. Results can be separate for each framework or a common one for all can also be used.

Drawbacks

  • An Internet connection is a must to use BDD. In 2023, I think it is not a big deal.

  • If API is down or any kind of network issues BDD will not work. Instead, certain language-coded scripts or test cases will work as usual without the internet.

  • Compared to existing frameworks, this AI-based can be a bit slower.

  • Set up for local execution is hard and will be slow based on computers.

  • Maintaining API and modifying it may be a bit harder for those who don't have an idea about NLP, Neural networks and GCP or AWS.

This is not end. It is completely initial idea and can be improved with more features according to time.

As each time I'm saying, please mention in comments if you have any postive or negative flags.

Thank you.