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