| Test Distribution | Reflective CI Status |
|---|---|
Last Updated: [Dynamic via GitHub Pages]
TestAIgnite is a robust, AI-powered automation framework designed to provide high-quality testing through stable design patterns and automated analysis. This framework ensures that software remains reliable while providing clear, actionable insights when issues occur.
The primary goal of TestAIgnite is to solve the common problems of traditional automation:
- Brittle Tests: Tests that fail because of minor visual changes rather than actual bugs.
- Complicated Maintenance: High effort required to update tests when the application changes.
- Difficult Diagnostics: Wasting time trying to understand why a test failed.
TestAIgnite addresses these by separating the "intent" of a test from the "technical details" of the application, and by using Artificial Intelligence to diagnose failures automatically.
To set up the framework on your local machine, run:
npm installEnvironments are isolated per run. Each environment configuration (see cypress/config/*.env.json) now includes a specPattern that maps specific test files to that environment.
To run only the tests associated with a specific environment (e.g., auth-demo or landing), use the --env flag. The framework will automatically detect the environment and load only the relevant spec files.
-
Recommended Syntax (npm):
npm run cy:run -- --env auth-demo
(Note: The
--is required to pass arguments correctly through npm) -
Explicit Syntax:
npm run cy:run -- --env environment=auth-demo
After a test finishes, you can trigger the AI to analyze the raw JSON results and compile a final HTML report:
-
1. Run AI Enrichment:
npm run report:ai
(or
npm run ai:ignite) -
2. Compile the HTML Report:
npm run report:html
-
3. View the Results:
npm run report:open
To run Cypress tests, pass the results to the AI for analysis, build the HTML report, and generate charts all in one single sequence, run:
npm run test:AIgnite(or npm run report:full)
- Run all environments sequentially (outputs saved under
cypress/reports_by_env/<env>/):(To target a subset, pass env names:npm run report:full:all
node scripts/runAllEnvs.js landing admin)
it employs a clean and clear pattern in the use of selectors in tests, as they stored modularly.
How it works:
- Define the selector in
cypress/fixtures/selector-map.json:
{
"loginPage": {
"usernameField": "#user-id-input",
"submitButton": ".btn-primary-blue"
}
}- Use the logical name in your test:
// The framework finds "#user-id-input" automatically via the key
cy.getSelector("loginPage.usernameField").type("my-username");Impact: If a developer changes the button color or ID, you only update the JSON file once. Your tests remain untouched.
The framework automatically adjusts its behavior based on whether you are testing on Development, Staging, or Production.
How it works:
- Configuration is stored in environment files (e.g.,
cypress/config/staging.env.json):
{
"baseUrl": "https://staging.ourapp.com",
"roles": {
"admin": { "email": "admin@staging.com", "password": "pass" }
}
}- Access settings in your test without hardcoding:
import { getBaseUrl } from "../support/config/env";
import { getCredentials } from "../support/config/auth";
it("performs an admin login", () => {
cy.visit(getBaseUrl()); // Automatically goes to the staging URL
const creds = getCredentials("admin"); // Fetches staging-specific credentials
cy.getSelector("loginPage.usernameField").type(creds.email);
});We group common tasks into "Actions" so that multiple tests can reuse the same logic.
How it works:
Standardized code in cypress/support/actions/buttons.actions.js:
export const clickButton = (selectorKey) => {
cy.getSelector(selectorKey)
.should("be.visible")
.and("not.be.disabled")
.click();
};Usage in a test:
import { clickButton } from "../support/actions/buttons.actions";
it("submits the form", () => {
clickButton("loginPage.submitButton"); // Handles visibility and click logic automatically
});A standard test combines these patterns to create a script that reads like a set of instructions.
import { clickButton } from "../support/actions/buttons.actions";
import { typeInput } from "../support/actions/inputs.actions";
import { getBaseUrl } from "../support/config/env";
describe("User Authentication Flow", () => {
it("should allow a user to log in successfully", () => {
// 1. Technical detail (URL) is handled by Environment Intelligence
cy.visit(getBaseUrl());
// 2. Interaction is handled by Action Abstraction
// 3. Selection is handled by Selector Intelligence
typeInput("loginPage.usernameField", "test_user");
typeInput("loginPage.passwordField", "secure_password");
clickButton("loginPage.loginButton");
// 4. Verification Check
cy.url().should("include", "/dashboard");
});
});- Stakeholders: Can read the test files to understand business requirements without needing to understand CSS or HTML.
- Automation Engineers: Can build new tests rapidly by reusing existing Actions and Selectors.
- Quality Analysts: Use the AI Diagnostics to identify if a failure is a real bug or a temporary environment issue.