-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[TestProxy] Run test with testproxy for mgmt SDK
Jiefeng Chen edited this page Feb 24, 2022
·
13 revisions
-
Python 3.7 or later is required
-
create virtual environment
python -m venv venv-dev .\venv-dev\Scripts\Activate.ps1 -
prepare SDK repo if needed
git clone https://github.com/Azure/azure-sdk-for-python.git -
prepare TestProxy if needed. (more details)
Run the following command to download and run the docker image with Testproxy.
.\eng\common\testproxy\docker-start-proxy.ps1 "start"
-
Preparation dependence
Go to the directory for test.Like this:
D:\azure-sdk-for-python\sdk\servicebus\azure-mgmt-servicebusAnd run command:
pip install -r dev_requirements.txt pip install -e . -
Add test proxy certificate
Copy certificate to
cacert.peminvenv\Lib\site-packages\certifi\ -
Then run test command.like this:
(venv) D:\azure-sdk-for-python\sdk\servicebus\azure-mgmt-servicebus>pytest tests -
Check the test results
