-
Notifications
You must be signed in to change notification settings - Fork 0
Add --testcase-timeout CLI option to set default testcase timeout #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --testcase-timeout CLI option to set default testcase timeout #3
Conversation
Co-authored-by: butako <[email protected]>
Co-authored-by: butako <[email protected]>
Co-authored-by: butako <[email protected]>
Co-authored-by: butako <[email protected]>
| It's useful when ``setup`` has much initialization work that takes long, e.g. connects to a server but has no response and makes program hanging. Note that this ``@timeout`` decorator can also be used for ``pre_testcase`` and ``post_testcase``, but that is not suggested because pre/post testcase methods are called everytime before/after each testcase runs, they should be written as simple as possible. | ||
| Default Testcase Timeout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot this documentation is too verbose, can you make it more succinct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the documentation more succinct in commit b098c68. Reduced from ~15 lines to 7 lines while keeping all essential information.
Co-authored-by: butako <[email protected]>
| mockplan.add(multitest) | ||
| mockplan.run() | ||
|
|
||
| # First test should pass (completes quickly) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct terminology is 'testsuite' @copilot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed terminology to use 'testsuite' in commit 94f645e.
Co-authored-by: butako <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot remove the example from the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the example file in commit a546315.
Co-authored-by: butako <[email protected]>
Plan: Add --testcase-timeout CLI option
Summary
Successfully implemented the
--testcase-timeoutCLI option that allows setting a default timeout for all testcases in a Testplan.Changes Made:
TESTCASE_TIMEOUT = Nonedefault value--testcase-timeoutCLI argument with helpful descriptiontestcase_timeoutto TestRunnerConfig with validation allowing>= 0testcase_timeoutparameter to MultiTest.inittestcase_timeoutto MultiTestConfig options with validation allowing>= 0How it works:
python my_test.py --testcase-timeout 60MultiTest(name="test", suites=[...], testcase_timeout=60)--testcase-timeout 0disables the default timeout (equivalent to omitting the option)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.