Firebase App Testing provides AI-driven automated testing capabilities for web applications using natural language test descriptions.
Execute automated tests written in natural language and driven by AI.
/**
* Run automated tests written in natural language driven by AI
* @param target - Target environment or configuration for testing
* @param options - Configuration options
* @returns Promise resolving when test execution completes
*/
function apptestingExecute(
target: string,
options?: Options & {
/** Firebase web app ID for testing */
app?: string;
/** Test file pattern filter */
testFilePattern?: string;
/** Test name pattern filter */
testNamePattern?: string;
/** Request test execution without waiting for completion */
testsNonBlocking?: boolean;
}
): Promise<void>;import * as client from "firebase-tools";
// Execute tests for a target environment
await client.apptesting.execute("production", {
project: "my-project",
app: "1:123456789:web:abc123def456"
});
// Execute specific test files
await client.apptesting.execute("staging", {
project: "my-project",
app: "1:123456789:web:abc123def456",
testFilePattern: "auth-*.test.js"
});
// Execute tests matching a name pattern
await client.apptesting.execute("development", {
project: "my-project",
app: "1:123456789:web:abc123def456",
testNamePattern: "login flow"
});
// Non-blocking execution
await client.apptesting.execute("production", {
project: "my-project",
app: "1:123456789:web:abc123def456",
testsNonBlocking: true
});# Execute tests for target environment
firebase apptesting:execute production --app=1:123456789:web:abc123def456
# Execute specific test files
firebase apptesting:execute staging \
--app=1:123456789:web:abc123def456 \
--test-file-pattern="auth-*.test.js"
# Execute tests matching name pattern
firebase apptesting:execute development \
--app=1:123456789:web:abc123def456 \
--test-name-pattern="login flow"
# Non-blocking execution
firebase apptesting:execute production \
--app=1:123456789:web:abc123def456 \
--tests-non-blockingApp Testing requires:
Tests are written in natural language describing user interactions and expected outcomes:
Test: User login flow
Given a user visits the login page
When they enter valid credentials and click submit
Then they should be redirected to the dashboard
And see a welcome messageapp parameter should be the Firebase web app ID--tests-non-blocking for CI/CD pipelines to avoid timeouts