-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🔧 setup CI * 🐛 Fix path * cd * set working dir * fix openpose tests * Fix web_api tests * Fix batch hijack tests * change coverage dir * 📝 Add doc
- Loading branch information
Showing
8 changed files
with
140 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Tests | ||
There are 2 types of tests: | ||
- unittest: backend based tests that directly import A1111 shared modules | ||
- api test: test functionality through A1111 web API | ||
|
||
# Run tests locally | ||
Make sure the current working directory is A1111 root. | ||
|
||
## Install test dependencies | ||
`pip install -r requirements-test.txt` | ||
|
||
## Start test server | ||
```shell | ||
python -m coverage run | ||
--data-file=.coverage.server | ||
launch.py | ||
--skip-prepare-environment | ||
--skip-torch-cuda-test | ||
--test-server | ||
--do-not-download-clip | ||
--no-half | ||
--disable-opt-split-attention | ||
--use-cpu all | ||
--api-server-stop | ||
``` | ||
|
||
## Run test | ||
```shell | ||
python -m pytest -vv --junitxml=test/results.xml --cov ./extensions/sd-webui-controlnet --cov-report=xml --verify-base-url ./extensions/sd-webui-controlnet/tests | ||
``` | ||
|
||
## Check code coverage | ||
Text report | ||
```shell | ||
python -m coverage report -i | ||
``` | ||
|
||
HTML report | ||
```shell | ||
python -m coverage html -i | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters