* wip * wip2 * wip3 * fix issues * Add scribble xdog * port legacy processors * nit * Add tests * Fix modules test * Add back normal_dsine * Remove legacy code * Remove code * Add tests * rename param * Linter ignore * fix is_image * fix is_image * nit * nit * Better assertion message * Add back ip-adapter-auto * Add test * Fix various tag matching * fix * Add back preprocessor cache * Add back sparse ctrl * fix test failure * Add log |
||
|---|---|---|
| .. | ||
| annotator_tests/openpose_tests | ||
| cn_script | ||
| external_code_api | ||
| images | ||
| web_api | ||
| README.md | ||
| conftest.py | ||
| utils.py | ||
README.md
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
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
Setting environment variables
Setting CONTROLNET_TEST_SD_VERSION for stable diffusion model family used during testing.
- 1 for SD1.x
- 2 for SD2.x
- 3 for SDXL
Run test
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
python -m coverage report -i
HTML report
python -m coverage html -i