Test: CLI backup script #10

Open
opened 2026-06-02 20:29:25 +00:00 by jmiller · 1 comment
Owner

Verify the CLI script works for cron-based backups.

Scope

  • Default profile execution
  • Custom profile selection
  • Custom description
  • Exit codes
  • Error handling

Acceptance Criteria

  • CLI runs from Joomla root with php cli/mokobackup.php
  • --profile flag selects correct profile
  • --description flag sets backup description
  • Exit 0 on success, exit 1 on failure
  • Origin field set to "cli"
Verify the CLI script works for cron-based backups. ## Scope - Default profile execution - Custom profile selection - Custom description - Exit codes - Error handling ## Acceptance Criteria - [ ] CLI runs from Joomla root with php cli/mokobackup.php - [ ] --profile flag selects correct profile - [ ] --description flag sets backup description - [ ] Exit 0 on success, exit 1 on failure - [ ] Origin field set to "cli"
jmiller added the type: testingpriority: mediumcomponent: enginestatus: ready labels 2026-06-02 20:29:25 +00:00
Author
Owner

Testing Plan

TC-10.1: Default execution

cd /path/to/joomla
php administrator/components/com_mokobackup/cli/mokobackup.php

Verify: Backup created with profile 1, exit code 0

TC-10.2: Custom profile

php cli/mokobackup.php --profile=2

Verify: Uses profile 2

TC-10.3: Custom description

php cli/mokobackup.php --description="Nightly backup"

Verify: Description appears in backup record

TC-10.4: Failure exit code

php cli/mokobackup.php --profile=999
echo $?

Verify: Exit code 1, "Profile not found" message

TC-10.5: Origin field

  1. Run via CLI
  2. Check backup record
  3. Verify origin = "cli"
## Testing Plan **TC-10.1: Default execution** ```bash cd /path/to/joomla php administrator/components/com_mokobackup/cli/mokobackup.php ``` Verify: Backup created with profile 1, exit code 0 **TC-10.2: Custom profile** ```bash php cli/mokobackup.php --profile=2 ``` Verify: Uses profile 2 **TC-10.3: Custom description** ```bash php cli/mokobackup.php --description="Nightly backup" ``` Verify: Description appears in backup record **TC-10.4: Failure exit code** ```bash php cli/mokobackup.php --profile=999 echo $? ``` Verify: Exit code 1, "Profile not found" message **TC-10.5: Origin field** 1. Run via CLI 2. Check backup record 3. Verify origin = "cli"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomBackup#10