Post

Overcoming UI Testing Challenges in Low-Code/No-Code Development: A Case Study

This blog post explores a real-world scenario where a team faced complex UI testing hurdles while developing a business process application using PEGA, a popular LCNC framework.

Project Overview

Our case study focuses on a team developing a LCNC business flow application for an X-Ray machine manufacturer. Let’s break down the key aspects of this project:

  • Platform: PEGA LCNC framework
  • Application Type: Business process management
  • Scope: 11 core pages with an average of 60 fields per page (approximately 650 fields total)
  • User Types: 7 distinct user roles, each with specific view and edit permissions
  • Field Types: Labels, various input types (text, textarea, checkbox, radio button), attachment buttons, and tables
  • Complexity: More than 10,000 UI combinations to be tested

The UI Testing Challenge

The team encountered several challenges that made UI testing particularly complex:

  1. Vast Number of UI Combinations: With over 10,000 possible UI combinations, traditional manual testing approaches were impractical and time-consuming.

  2. Dynamic Specifications: The UI specifications were not static. They evolved with each sprint, requiring constant updates to the testing strategy.

  3. User-Specific Permissions: Different user roles had varying levels of access to view and edit fields, multiplying the number of scenarios to be tested.

  4. Field Variability: A mix of mandatory and optional fields, along with diverse field types, added layers of complexity to the testing process.

  5. Rapid Development Cycle: The LCNC approach allowed for quick changes, but this agility also meant that the UI could change frequently, potentially introducing new defects.

The Solution: A Dynamic Approach to UI Testing

To address these challenges, the team developed an innovative, automated solution. Here’s a breakdown of their approach:

  1. Automated Page Crawling
    • Utilized Selenium WebDriver to automatically log in and crawl all pages for each user type.
    • Downloaded HTML pages locally and generated a page access result table.
  2. HTML to JSON Conversion
    • Used lxml to parse downloaded HTML files and extract relevant field information.
    • Generated JSON files for each page, capturing the actual UI structure.
  3. Specification JSON Generation
    • Converted business team’s Excel-based specifications into JSON format.
    • Captured user access rights, edit permissions, and field requirements for each element.
  4. Automated Test Result Generation
    • Compared page JSON (actual UI) with specification JSON (expected UI).
    • Generated detailed test results, including reasons for test case failures.
  5. Continuous Integration
    • Integrated this process into the development workflow, allowing for quick UI verification after each update.

Sample Test Result

Here’s an example of how the test results were presented:

#User TypeField NameSpecification DisplaySpecification EditableTest DisplayTest EditableField ValueField TypeResultRemarks
1UserNameYesYesYesYesNoneInputPASS 
2UserAgeYesNoYesYes20InputFAILField should not be editable but is editable

Outcomes and Benefits

This innovative approach to UI testing in an LCNC environment yielded significant benefits:

  1. Rapid Defect Identification: Developers could quickly identify and fix UI defects, dramatically reducing defect resolution time.

  2. Improved Quality Assurance: By the time the application reached business acceptance testing, almost no UI-related defects were reported.

  3. Focus on Complex Issues: With UI issues largely resolved, the team could concentrate on testing workflow and complex business logic.

  4. Specification Improvement: The process uncovered inconsistencies in the business-provided specifications, leading to clearer requirements.

  5. Change Management: The team gained the ability to measure the volume of change requests more accurately.

Conclusion

This case study demonstrates how innovative, automated approaches can overcome the unique challenges of UI testing in LCNC environments. By leveraging technology to automate the testing process, development teams can ensure high-quality UI implementations while maintaining the speed and agility that LCNC platforms provide.

As LCNC platforms continue to grow in popularity, adopting similar strategies will be crucial for teams looking to balance rapid development with robust quality assurance.

This post is licensed under CC BY 4.0 by the author.