Skip to content

Script Management

The Script Management module in AngusTester provides full lifecycle management for automated test scripts, supporting the entire process from script creation and debugging to execution and version control.

I. Basic Script Operations

1. Create Script

Description: Define automated testing or data simulation logic
Steps:

  1. In Script Management, click "Add Script"
  2. Fill in key parameters:
    • Naming format: [Module]_[Function]_Script (e.g., Login_PerformanceTest)
    • Script type (Test Script/Data Generation/Mock)
    • Script content (written according to specifications)

      ⚠️ Refer to the official documentation for syntax standards

2. Import Script

Description: Bulk import external script files
Steps:

  1. In Script Management, click "Import Script"
  2. Process:
    • Download template (JSON format)
    • Fill content according to specifications
    • Upload file (≤10MB)
      ❗ Select overwrite policy for duplicate script names

3. Modify Script

Description: Update script logic or configurations
Steps:

  1. In Script Management List, click "Edit" for the target script
  2. Adjustable content:
    • Script parameters (environment variable configurations)
    • Core logic (must retain historical versions)
      ⚠️ Running scripts cannot be modified

4. Clone Script

Description: Create script copies for derivative development
Steps:

  1. On the Script Details Page, click "Clone"
  2. The system automatically:
    • Generates a copy (appends "_Copy" to the name)
    • Copies parameter configurations
    • Preserves content versions
      Key parameters must be manually modified

5. Export Script

Description: Backup scripts or migrate across projects
Steps:

  1. In Script Management List, select target scripts
  2. Click "Export"
  3. Select format:
    • JSON (standard structure)
    • YAML (compact format)

II. Script Execution Management

1. Debug Script

Description: Verify script logic correctness
Steps:

  1. On the Script Details Page, click "Debug"
  2. Analyze debug results:
    • Output logs (segmented by execution steps)
    • Error stack traces (highlighted in red)
    • Variable tracking (real-time value display)
      ⚠️ Debug environment is isolated from production

2. Execute Script

Description: Run script tasks officially
Steps:

  1. In Script Management List, click "Execute" for the target script
  2. Select execution mode:
    • Immediate execution (single run)
    • Scheduled execution (set cron expression)
  3. Monitor execution status:
    • Real-time log output
    • Resource consumption charts
    • Abnormal interruption notifications
      ❗ Maximum runtime per script: 2 hours

3. Terminate Execution

Description: Force-stop abnormal scripts
Steps:

  1. In Execution Record List, locate the running task
  2. Click "Terminate"
  3. The system automatically:
    • Sends SIGTERM signal
    • Saves current progress snapshot
    • Generates exception analysis report
      ⚠️ May cause data state inconsistency

4. Execution Record Audit

Description: Trace historical execution details
Steps:

  1. In Execution Records, click the target record
  2. View key information:
    • Input/Output parameter snapshots
    • Execution timeline (including subprocess tree)
    • Resource usage heatmap
      Data retained for 90 days

III. Script Maintenance Management

1. Delete Script

Description: Clean up obsolete script resources
Steps:

  1. In Script Management List, select target scripts
  2. Click "Delete"
  3. Confirm by entering the script name
    ❗ Scripts bound to tasks must be unlinked first

2. Version Rollback

Description: Restore stable historical versions
Steps:

  1. Navigate to Script Details → Version History
  2. Select target version and click "Restore"
  3. The system automatically:
    • Overwrites current content
    • Generates rollback record
    • Triggers email notification
      ⚠️ Only the last 10 versions are retained

Released under the GPL-3.0 License.