DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Elevate your data management. Join a lively chat to learn how streaming data can improve real-time decision-making, and how to reduce costs.

Platform Engineering: Enhance the developer experience, establish secure environments, automate self-service tools, and streamline workflows

Build Cloud resilience. High-profiled cloud failures have shown us one thing – traditional approaches aren't enough. Join the discussion.

Data Engineering: The industry has come a long way from organizing unstructured data to adopting today's modern data pipelines. See how.

Related

  • Mutation Testing: The Art of Deliberately Introducing Issues in Your Code
  • AI-Driven Test Automation: Future of Software QA
  • Agile Testing: Blending Shift-Left, Automation, and Collaborative Testing Strategies
  • The Four Steps of Regression Testing

Trending

  • Build Retrieval-Augmented Generation (RAG) With Milvus
  • How to Get There: Bridging the Technology Gap Preventing You From Adopting a Secrets-Free Machine Identity Framework
  • 4 Essential Strategies for Enhancing Your Application Security Posture
  • Challenges and Ethical Considerations of AI in Team Management
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. Grow Your Skills With Low-Code Automation Tools

Grow Your Skills With Low-Code Automation Tools

There are several ways to optimize the use of low-code tools and simplify the maintenance and readability of your tests.

By 
Mike Harris user avatar
Mike Harris
·
Jun. 02, 23 · Opinion
Likes (1)
Comment
Save
Tweet
Share
2.8K Views

Join the DZone community and get the full member experience.

Join For Free

Some of the tools we can use to automate tests are low-code tools. One of the tools I use to automate browser testing is the low-code tool, Ghost Inspector. You can develop reliable automated tests and learn a great deal about test automation by using Ghost Inspector.

What Is Ghost Inspector?

Ghost Inspector can be used to automate tests without writing any code. You can build a test out of steps that do not require coding. You can identify elements in the web page that you are testing using an identifier such as an XPath or a CSS selector and then choose a test step that interacts with the element in the way that you require, for example, by clicking or by assigning a value. This provides a simple way to create automated tests. Creating tests without writing code can be valuable because it enables a tester who can not write code to start creating tests. However, if a large number of tests are created in this way, they can become can be time-consuming to maintain and hard to read. They can take a lot of time to maintain because if an element on a page that you are testing changes, you will have to find every use of that element and update it. Tests created in this way can also be hard to read as when you read the steps, see a step that clicks on a div whose class starts with a certain string and then a step that waits for an element that is a span whose class contains a certain string, and you are left trying to remember what do these steps do.

There are a number of things that you can do to make the most of low-code tools and make your tests easier to maintain and read.

Maintaining Your Tests

One way to make your tests easier to read and maintain is to encapsulate groups of steps in a module that you can then import the module into tests. Encapsulating steps in a module helps to make tests easier to maintain because if a page element changes, you only need to update the steps in the module instead of updating steps in many tests. This makes maintenance easier and quicker. Creating tests is also quicker if you have created modules because instead of creating new steps for your new test, you can use these modules to create new tests. An example of this would be importing a module “login” that contains the steps to log in rather than creating all the steps to log in each time you create a test. The login module can be used whenever a test needs to log in.

The naming of these modules is important for two reasons. Firstly you need a name that you can find easily in your library of modules, and secondly, the name needs to be descriptive so that when you read the name of the module in a test, it is clear what the module does. Having modules that are named well also makes your tests much easier to read.

Dynamic Behavior With Variables

Ghost Inspector is a low-code tool that supports the use of variables. When you start to create tests, you can create tests without using variables, but using variables also makes your tests easier to create, maintain and read. A variable holds a value that can be updated. The value it holds can be a URL, an email, a password, a CSS selector, and something else that a test uses. If the value represented by the variable changes, you only need to change the value held in the variable instead of everywhere the value is used. Giving your variables names that can be clearly understood will help the readability of your tests.

Variables work in a given scope. The scope could be a test, a test suite, or be ‘global ‘ so that the variable can be used in all the tests and test suites. Variables that you create within a test only work within that test. Variables that you create in a test suite only work within tests that are part of that test suite, and variables that you create under your organization work globally on all tests that you create.

Modules can use the variables that you create. An example of a module using variables would be to assign values to variables for email and password and then have the login module use those variables to log in. This would enable the login module to be used to log in as different users.

Accessing the Power of the Browser With JavaScript

Ghost Inspector also enables the user to use JavaScript to create steps in tests. You can create steps that execute JavaScript, in which JavaScript returns true or extract a variable from JavaScript. You don’t need to use JavaScript to create Ghost Inspector tests but using JavaScript in test steps enables you to extend Ghost Inspector functionality and provides a way to learn JavaScript. You can learn at your own pace. There are lots of resources to learn JavaScript. You can start by storing variables in a JavaScript object in an Extract From JavaScript Object step like this:

const emailAndPassword = { email: "user@email.com", password: "password" };
return emailAndPassword

You could then use the variable in a module to log in to the application that you are testing.

You can also create steps that extract values from page elements or create a variable from one of the values held in a JavaScript Object. Ghost Inspector includes a step that checks for the presence of one element on a page, and if you want to check for more than one element with the same CSS selector, you can write a step to do that uses document.querySelectorAll(selector).length to get the number of elements and then use an ‘if loop’ to check that the number of elements is correct. If the correct number of elements is found, the step will return true if not, the step returns false, and the test fails. Creating steps with JavaScript can help you develop your skills with JavaScript at your own pace.

Your tests will be more consistent and easier to maintain if you create standards for your tests. An example of a standard you could create would be a naming standard for variables. You could create a standard for naming variables that states that variables should have a prefix to show if their scope is local to the test, to the test suite, or that they are global variables that can be used throughout your tests. A standard for naming variables could look like this:

  • Names of standards should be camel case.
  • Names of organization-level variables should start with the org.
  • Names of test suite-level variables should start with ts.

A standard like this will help you maintain and develop tests because when you read the variable’s name, you will know its scope. The standards can be extended to include other points that you find useful, such as what type of element selector is preferred and how libraries of modules should be organized. Using standards when creating tests will also help collaboration because everyone who is creating the tests should use the standards when creating tests.

The Five S’s

It is also useful to use the Five S’s to create a disciplined structure to help you create and maintain automated low-code tests. The Five S’s are recommended by Mary and Tom Poppendiek as a way to create the discipline necessary to develop quality software. They wrote that “the five S’s are a classic lean tool to organize a workspace.”

The Five S’s can help keep Ghost Inspector automated tests in a state where they are easy to maintain, have no flaky tests, and are easy to read.

The Five S’s are described in Implementing Lean Software Development by translating the original Japanese words into English and by giving examples of using each of the S’s in the kitchen, in the workplace, and for a development project. I have used Mary and Tom Poppendiek’s idea and created a table showing the English translation of the Japanese words and examples of using the Five S’s in the kitchen, workplace, and Ghost Inspector test automation.

JAPANESE ENGLISH KITCHEN WORKSPACE GHOST INSPECTOR TEST AUTOMATION
Seiri Sort Sort through kitchen tools and throw away any unused tools. Sort through the servers, and find old files that will never be used. Delete or back them up. Remove unused modules
Seiton Systemise Find a place for everything and make it easy to find. Craft desktop layouts and file structures so that things are easy to find Organise tests, test suites, and modules so that everything is easy to find.
Seiso Shine Clean the kitchen. Clean whiteboards and desktops. Bring old tests in line with the standards
and improve performance.
Seiketsu Standardise Fill and run the dishwasher every night Put automation and standards in place. Reduce complexity, improve ease of maintenance, and create standards.
Shitsuke Sustain Keep up the discipline Keep up the discipline. Use and follow standard procedures.

In many ways, Sustain is the most important of the Five S’s because it is by sustaining the practices you create using the Five S’s that your automated tests will become more reliable, easier to maintain, and easier to read.

Wrapping Up

In making the most of low code test automation, you will create reliable automated tests and learn a range of software development skills such as using the scope of variables, coding in JavaScript, encapsulation to create modules, writing standards, and how to use the Five S’s. These skills will help you create stable test automation with Ghost Inspector and will help you develop your test automation skills.

CSS Software development Test automation Test suite Ghost (disk utility) Testing

Published at DZone with permission of Mike Harris. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Mutation Testing: The Art of Deliberately Introducing Issues in Your Code
  • AI-Driven Test Automation: Future of Software QA
  • Agile Testing: Blending Shift-Left, Automation, and Collaborative Testing Strategies
  • The Four Steps of Regression Testing

Partner Resources


Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: