You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Test Case ID

Test Objective

Test Steps

Expected Outcome

Test Type

TC-001Validate loading config via AIRFLOW_CLI_ENVIRONMENT
  1. Set `export AIRFLOW_CLI_ENVIRONMENT=dev`
  2. Ensure `~/airflow/dev.json` exists
  3. Run `airflowctl auth login --username admin --password`. Write admin  and press enter.
  4. Run `airflowctl connections list`
Config is loaded from `~/airflow/dev.json`, user is authenticated, Connections are listedPositive
TC-002Handle missing config file for specified environment
  1. Set export AIRFLOW_CLI_ENVIRONMENT=nonexistent 
  2. Ensure `~/airflow/nonexistent.json` doesn't exist
  3. Run `airflowctl connections list`
Error: `Configuration file '~/airflow/nonexistent.json' not found`Negative
TC-003Verify login with valid username and password using default environment
  1. Set `AIRFLOW_CLI_ENVIRONMENT=default`
  2. Ensure `~/airflow/default.json` exists
  3. Run airflowctl auth login --username admin --password . Write admin  and press enter.
  4. Run `airflowctl connections list`
User is authenticated, Connection list is returnedPositive
TC-004Ensure login fails if --username or --password is missing
  1. Set env: `AIRFLOW_CLI_ENVIRONMENT=default`
  2. Run `airflowctl auth login --username admin`. 
Error: `--password is required`Negative
TC-005Reject login with invalid credentials
  1. Set env: `AIRFLOW_CLI_ENVIRONMENT=default`
  2. Run `airflowctl auth login --username wrong --password`. Write wrongpass  and press
Error: `Invalid credentials`Negative
TC-006RBAC prevents restricted user from accessing Connections
  1. Login as user with no Connections access
  2. Run `airflowctl connections list`
Error message like `Permission denied` or HTTP 403Negative
TC-007RBAC allows permitted user to access Connections
  1. Login as user with Connections access
  2. Run `airflowctl connections list`
Connection list is returnedPositive
TC-008Handle API downtime gracefully
  1. Simulate API downtime (Turn Off API: No Response , Run in dev mode and make a changes in file: timeout )
  2. Ensure valid credentials are logged in before executing any commands.xxxx
  3. Run `airflowctl connections list`
CLI shows `API unreachable` or appropriate timeout errorEdge
TC-009Verify CLI triggers correct API endpoints
  1. Login with valid credentials
  2. Run `airflowctl connections list`
  3. Check backend logs and ensure proper API endpoint is called
API logs show endpoint: `GET /api/v2/connections`Positive
TC-010Command Testing
  1. Run airflowctl auth login --username admin --password . Write admin  and press enter.
  2. Write airflowctl -h  and recursively write all the help commands for group and action commands. 
  3. Test each command such as airflowctl connections list, create, delete, update  respectively
Ensure commands are working properlyPositive
TC-011Verify version
  1. Run airflowctl auth login --username admin --password . Write admin  and press enter.
  2. Write airflowctl -h  and recursively write all the help commands for group and action commands. 
  3. Run airflowctl version 
Proper airflowctl  and airflow  versions are listed.Positive
  • No labels