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:
Vast Number of UI Combinations: With over 10,000 possible UI combinations, traditional manual testing approaches were impractical and time-consuming.
Dynamic Specifications: The UI specifications were not static. They evolved with each sprint, requiring constant updates to the testing strategy.
User-Specific Permissions: Different user roles had varying levels of access to view and edit fields, multiplying the number of scenarios to be tested.
Field Variability: A mix of mandatory and optional fields, along with diverse field types, added layers of complexity to the testing process.
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:
- 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.
- 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.
- 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.
- Automated Test Result Generation
- Compared page JSON (actual UI) with specification JSON (expected UI).
- Generated detailed test results, including reasons for test case failures.
- 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 Type | Field Name | Specification Display | Specification Editable | Test Display | Test Editable | Field Value | Field Type | Result | Remarks |
---|---|---|---|---|---|---|---|---|---|---|
1 | User | Name | Yes | Yes | Yes | Yes | None | Input | PASS | |
2 | User | Age | Yes | No | Yes | Yes | 20 | Input | FAIL | Field should not be editable but is editable |
Outcomes and Benefits
This innovative approach to UI testing in an LCNC environment yielded significant benefits:
Rapid Defect Identification: Developers could quickly identify and fix UI defects, dramatically reducing defect resolution time.
Improved Quality Assurance: By the time the application reached business acceptance testing, almost no UI-related defects were reported.
Focus on Complex Issues: With UI issues largely resolved, the team could concentrate on testing workflow and complex business logic.
Specification Improvement: The process uncovered inconsistencies in the business-provided specifications, leading to clearer requirements.
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.