gist-cache-rs Functional Verification Test Design Document (Test Set 3: Interpreter Operation Verification)
Test Objective
To confirm that gist-cache-rs correctly launches each interpreter, passes arguments, and executes scripts.
Target Functionality
- Bash execution (bash)
- Python execution (python3)
- Ruby execution (ruby)
- Node.js execution (node)
- PHP execution (php)
- Perl execution (perl)
- PowerShell execution (pwsh)
- TypeScript execution (ts-node, deno, bun)
- UV execution (uv run) - PEP 723 compatible
Prerequisites
- gist-cache-rs is installed
- GitHub CLI is authenticated
- Metadata cache is up-to-date (
gist-cache-rs updatehas been executed) - Each interpreter is installed on the system
- Test Gists for hello_args series exist
Test Case List
TC1: Bash Execution
Objective: Confirm that Bash scripts are executed correctly.
Prerequisites:
- hello_args.sh (ID: 7bcb324e9291fa350334df8efb7f0deb) exists.
Steps:
- Execute with Bash:
gist-cache-rs run --id 7bcb324e9291fa350334df8efb7f0deb bash arg1 arg2 arg3 - Check execution result.
Expected Result:
- Bash version is displayed.
- Number of arguments “3” is displayed.
- Arguments are displayed correctly (arg1, arg2, arg3).
- “Could not calculate as a number” is displayed as arguments are not numerical.
Verification Items:
- Bash interpreter launches correctly.
- Arguments are passed correctly.
- Script executes successfully.
TC2: Python Execution
Objective: Confirm that Python scripts are executed correctly.
Prerequisites:
- hello_args.py exists.
Steps:
- Execute with Python:
gist-cache-rs run --filename hello_args.py python3 10 20 30 - Check execution result.
Expected Result:
- Python version is displayed.
- Number of arguments “3” is displayed.
- Arguments are displayed correctly (10, 20, 30).
- If the Python script has a sum calculation function, the sum “60” is displayed.
Verification Items:
- Python interpreter launches correctly.
- Arguments are passed correctly.
- Script executes successfully.
TC3: Ruby Execution
Objective: Confirm that Ruby scripts are executed correctly.
Prerequisites:
- hello_args.rb exists.
Steps:
- Execute with Ruby:
gist-cache-rs run --filename hello_args.rb ruby test1 test2 - Check execution result.
Expected Result:
- Ruby version is displayed.
- Number of arguments “2” is displayed.
- Arguments are displayed correctly (test1, test2).
Verification Items:
- Ruby interpreter launches correctly.
- Arguments are passed correctly.
- Script executes successfully.
TC4: Node.js Execution
Objective: Confirm that Node.js scripts are executed correctly.
Prerequisites:
- hello_args.js or hello_args_2.js exists.
Steps:
- Execute with Node.js:
gist-cache-rs run --filename hello_args.js node hello world - Check execution result.
Expected Result:
- Node.js version is displayed.
- Number of arguments “2” is displayed.
- Arguments are displayed correctly (hello, world).
Verification Items:
- Node.js interpreter launches correctly.
- Arguments are passed correctly.
- Script executes successfully.
TC5: PHP Execution
Objective: Confirm that PHP scripts are executed correctly.
Prerequisites:
- hello_args.php exists.
Steps:
- Execute with PHP:
gist-cache-rs run --filename hello_args.php php 100 200 - Check execution result.
Expected Result:
- PHP version is displayed.
- Number of arguments “2” is displayed.
- Arguments are displayed correctly (100, 200).
- Confirmed numerical calculation function:
100 + 200 = 300.
Verification Items:
- PHP interpreter launches correctly.
- Arguments are passed correctly.
- Script executes successfully.
TC6: Perl Execution
Objective: Confirm that Perl scripts are executed correctly.
Prerequisites:
- hello_args.pl exists.
Steps:
- Execute with Perl:
gist-cache-rs run --filename hello_args.pl perl foo bar baz - Check execution result.
Expected Result:
- Perl version is displayed.
- Number of arguments “3” is displayed.
- Arguments are displayed correctly (foo, bar, baz).
Verification Items:
- Perl interpreter launches correctly.
- Arguments are passed correctly.
- Script executes successfully.
TC7: PowerShell Execution
Objective: Confirm that PowerShell scripts are executed correctly.
Prerequisites:
- hello_args.ps1 (ID: 2cb45541fee10264b615fd641c577a20) exists.
pwshcommand is installed (PowerShell Core).
Steps:
- Execute with PowerShell:
gist-cache-rs run --id 2cb45541fee10264b615fd641c577a20 pwsh test1 test2 test3 - Check execution result.
Expected Result:
- PowerShell version is displayed.
- Number of arguments “3” is displayed.
- Arguments are displayed correctly (test1, test2, test3).
- “Calculation impossible because it contains non-numerical values” is displayed as arguments are not numerical.
Verification Items:
- PowerShell interpreter (
pwsh) launches correctly. - Arguments are passed correctly.
- Script executes successfully.
Numerical Argument Test:
- Execute with PowerShell:
gist-cache-rs run --filename hello_args.ps1 pwsh 10 20 30 - Expected Result: Sum “60” is displayed.
TC8: TypeScript Execution (Deno)
Objective: Confirm that TypeScript scripts are executed correctly with Deno.
Prerequisites:
- hello_args_deno.ts (ID: 9b0e7e1bdf7d24c3f28a80d18f6aaafe) exists.
denocommand is installed.
Steps:
- Execute with Deno (no arguments):
gist-cache-rs run --filename hello_args_deno.ts deno - Execute with Deno (string arguments):
gist-cache-rs run --filename hello_args_deno.ts deno test1 test2 test3 - Execute with Deno (numerical arguments):
gist-cache-rs run --filename hello_args_deno.ts deno 10 20 30 - Check each execution result.
Expected Result:
- Deno version is displayed.
- TypeScript version is displayed.
- V8 version is displayed.
- No arguments: Usage example is displayed.
- String arguments: Number of arguments “3”, arguments displayed correctly (test1, test2, test3), “Calculation impossible because it contains non-numerical values”.
- Numerical arguments: Number of arguments “3”, arguments displayed correctly (10, 20, 30), sum “60” is displayed.
Verification Items:
- Deno interpreter launches correctly.
- TypeScript file (.ts) is recognized correctly.
deno runcommand is used correctly.- Arguments are passed correctly.
- Script executes successfully.
TC9: TypeScript Execution (ts-node)
Objective: Confirm that TypeScript scripts are executed correctly with ts-node.
Prerequisites:
- hello_args.ts (ID: c3c925384cc8241d8cd30f269af84332) exists.
ts-nodecommand is installed (npm install -g ts-node typescript).
Steps:
- Execute with ts-node:
gist-cache-rs run --filename hello_args.ts ts-node hello world - Check execution result.
Expected Result:
- TypeScript version is displayed.
- Node.js version is displayed.
- Number of arguments “2” is displayed.
- Arguments are displayed correctly (hello, world).
- “Calculation impossible because it contains non-numerical values” is displayed as arguments are not numerical.
Verification Items:
- ts-node interpreter launches correctly.
- TypeScript file (.ts) is recognized correctly.
- Arguments are passed correctly.
- Script executes successfully.
Notes:
ts-nodeexecutes TypeScript on Node.js, sonpm install -g ts-node typescriptis required.- If not installed, this test case can be skipped.
TC10: TypeScript Execution (Bun)
Objective: Confirm that TypeScript scripts are executed correctly with Bun.
Prerequisites:
- hello_args_bun.ts (ID: a3d74a884ff923fc83c047c2cf3d6f08) exists.
buncommand is installed.
Steps:
- Execute with Bun:
gist-cache-rs run --filename hello_args_bun.ts bun 100 200 - Check execution result.
Expected Result:
- Bun version is displayed.
- Number of arguments “2” is displayed.
- Arguments are displayed correctly (100, 200).
- Sum “300” is displayed.
Verification Items:
- Bun interpreter launches correctly.
- TypeScript file (.ts) is recognized correctly.
- Arguments are passed correctly.
- Script executes successfully.
Notes:
- Bun is a fast JavaScript/TypeScript runtime.
- If not installed, this test case can be skipped.
TC11: UV Execution (PEP 723 Compatible)
Objective: Confirm that Python scripts are executed correctly with UV (PEP 723 compatible).
Prerequisites:
- hello_args.py exists.
uvcommand is installed.
Steps:
- Execute with UV:
gist-cache-rs run --filename hello_args.py uv 5 10 15 - Check execution result.
Expected Result:
- Python version is displayed (Python environment managed by uv).
- Number of arguments “3” is displayed.
- Arguments are displayed correctly (5, 10, 15).
- If the script has a sum calculation function, the sum “30” is displayed.
Verification Items:
- UV interpreter (
uv run) launches correctly. - PEP 723 metadata is processed correctly.
- Arguments are passed correctly.
- Script executes successfully.
Test Execution Order
- TC1: Bash Execution
- TC2: Python Execution
- TC3: Ruby Execution
- TC4: Node.js Execution
- TC5: PHP Execution
- TC6: Perl Execution
- TC7: PowerShell Execution
- TC8: TypeScript Execution (Deno)
- TC9: TypeScript Execution (ts-node)
- TC10: TypeScript Execution (Bun)
- TC11: UV Execution (PEP 723)
Notes
- Ensure each interpreter is installed on the system.
- Tests for uninstalled interpreters can be skipped.
- TC7 (PowerShell) primarily targets PowerShell Core (
pwsh) on Linux/macOS. - TC8-10 (TypeScript) verify operation with respective runtimes.
- TC8 (Deno): Native TypeScript support, most recommended (operation confirmed).
- TC9 (ts-node): Executes TypeScript on Node.js, requires installation (
npm install -g ts-node typescript). - TC10 (Bun): Native TypeScript support, fast execution (requires installation).
- TC11 (UV) specifically aims to verify PEP 723 compatibility.
- Output format may vary depending on the specific script implementation.
- Argument handling depends on the specifications of each language.