Skip to content

Commit 31f22ed

Browse files
committed
test(commands): simplify execution expectations and add timestamp calculation
1 parent ea3a460 commit 31f22ed

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

tests/extension-commands/TESTING.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,18 @@ Before you begin, read `../../extensions/EXTENSION-API-REFERENCE.md` to understa
1818
1919
You are evaluating if you can correctly parse `.specify/extensions.yml` to map a command name to a markdown file, and then execute the script described in that markdown file.
2020
21+
Based on the context perform the test cases.
22+
23+
start_timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
24+
2125
**Test Cases to Evaluate**:
2226
1. [Test Case 1] "Discovery Validation": Load the extension according to the specification. Verify that you have discovered the commands `speckit.test.lint` and `speckit.test.deploy`. If you can find them and their properties in the extensions config, mark as PASS. If not, mark as FAIL.
23-
2. [Test Case 2] "Simulate Lint Command": Simulate a user running `/speckit.test.lint`. Look up its execution configuration in `.specify/extensions.yml` and find its matching script file (`lint.md`). Since this is a testing sandbox, actually execute the required python command to get the execution output. Validate the output of the python program (it should be 'The linter is complete [timestamp]'). If you successfully produce this output, mark as PASS.
24-
3. [Test Case 3] "Simulate Deploy Command": Simulate a user running `/speckit.test.deploy`. Find its matching script file (`deploy.md`). Actually execute the required python command to get the execution output. Validate the output of the python program (it should be 'Staging deployment is completed at [timestamp]'). If you successfully produce this output, mark as PASS.
27+
2. [Test Case 2] "Simulate Lint Command": Simulate a user running `/speckit.test.lint`.
28+
Expectation : 'The linter is complete [timestamp]'. If you successfully produce this output, mark as PASS.
29+
3. [Test Case 3] "Simulate Deploy Command": Simulate a user running `/speckit.test.deploy`.
30+
Expectation : 'Staging deployment is completed at [timestamp]'. If you successfully produce this output, mark as PASS.
31+
32+
end_timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
2533
2634
**Required Output Format**:
2735
Provide your output exactly like this example format, replacing the bracketed content with your actual evaluation logic:
@@ -38,7 +46,7 @@ test_commands_execution.py::test_lint_command [PASS/FAIL]
3846
test_commands_execution.py::test_deploy_command [PASS/FAIL]
3947
Details: [Provide the specific command output for deploy, including the generated python timestamp string]
4048
41-
============================== [X] passed in 0.0s ==============================
49+
============================== [X] passed in (end_timestamp - start_timestamp) ==============================
4250
```
4351

4452
---

0 commit comments

Comments
 (0)