Skip to content
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

Improved testplan user experience #307

Merged
merged 8 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
versionSpec: '$(python.version)'
architecture: 'x64'
- task: NodeTool@0
displayName: 'Use Node 14.x'
displayName: 'Use Node 16.x'
inputs:
versionSpec: 14.x
versionSpec: 16.x
- task: Npm@1
displayName: 'Install dependencies'
inputs:
Expand Down Expand Up @@ -92,9 +92,9 @@ jobs:
versionSpec: '$(python.version)'
architecture: 'x64'
- task: NodeTool@0
displayName: 'Use Node 14.x'
displayName: 'Use Node 16.x'
inputs:
versionSpec: 14.x
versionSpec: 16.x
- task: Npm@1
displayName: 'Install dependencies'
inputs:
Expand Down Expand Up @@ -148,9 +148,9 @@ jobs:
versionSpec: '$(python.version)'
architecture: 'x64'
- task: NodeTool@0
displayName: 'Use Node 14.x'
displayName: 'Use Node 16.x'
inputs:
versionSpec: 14.x
versionSpec: 16.x
- task: Npm@1
displayName: 'Install dependencies'
inputs:
Expand Down
100 changes: 50 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
name: GitHub Actions CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
runs-on: ${{ matrix.os }}
steps:
- name: Cleanup pre-installed tools
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
run: |
# This is a fix for https://github.com/actions/virtual-environments/issues/1918
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Install Node.js dependencies
run: npm ci
- name: Build
run: npm run build --if-present
- name: Lint
run: npm run lint
- name: Audit
run: npm audit --production
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Show PYTHONPATH
run: |
which python
python -c "import sys; print(sys.version); print(sys.path);"
shell: bash
- name: Run tests
uses: GabrielBB/xvfb-action@v1
with:
run: npm test
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
runs-on: ${{ matrix.os }}
steps:
- name: Cleanup pre-installed tools
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
run: |
# This is a fix for https://github.com/actions/virtual-environments/issues/1918
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: Install Node.js dependencies
run: npm ci
- name: Build
run: npm run build --if-present
- name: Lint
run: npm run lint
- name: Audit
run: npm audit --production
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Show PYTHONPATH
run: |
which python
python -c "import sys; print(sys.version); print(sys.path);"
shell: bash
- name: Run tests
uses: GabrielBB/xvfb-action@v1
with:
run: npm test
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,24 @@ Right now, the three available options are `unittest`, `pytest` and `testplan`.

List of currently used properties:

Property | Description
-----------------------------------------------|---------------------------------------------------------------
`python.pythonPath` | Path to Python.
`python.envFile` | Path to environment variable definitions file.
`python.testing.cwd` | Optional working directory for unit tests.
`python.testing.unittestEnabled` | Whether to enable or disable unit testing using unittest (enables or disables test discovery for Test Explorer).
`python.testing.unittestArgs` | Arguments used for test discovery (currently only `-s` and `-p` arguments are considered).
`python.testing.pyTestEnabled` | Whether to enable or disable unit testing using pytest (enables or disables test discovery for Test Explorer).
`python.testing.pytestPath` | Path to pytest executable or a pytest compatible module.
`python.testing.pyTestArgs` | Arguments passed to the pytest. Each argument is a separate item in the array.
`python.testing.autoTestDiscoverOnSaveEnabled` | When `true` tests will be automatically rediscovered when saving a test file.
`pythonTestExplorer.testFramework` | Test framework to use (overrides Python extension properties `python.testing.unittestEnabled` and `python.testing.pyTestEnabled`).
`pythonTestExplorer.testplanPath` | Relative path to testplan main suite.
`pythonTestExplorer.testplanArgs` | Arguments passed in. Each argument is a separate item in the array.
`pythonTestExplorer.testplanEnabled` | Enable testing using Testplan. _Note that Testplan is only supported for Python 3.7+._
`pythonTestExplorer.outputs.collectOutputs` | Collect test run outputs in separate output channel.
`pythonTestExplorer.outputs.showOutputsOnRun` | Activate test outputs channel on run.
Property | Description
------------------------------------------------|---------------------------------------------------------------
`python.pythonPath` | Path to Python.
`python.envFile` | Path to environment variable definitions file.
`python.testing.cwd` | Optional working directory for unit tests.
`python.testing.unittestEnabled` | Whether to enable or disable unit testing using unittest (enables or disables test discovery for Test Explorer).
`python.testing.unittestArgs` | Arguments used for test discovery (currently only `-s` and `-p` arguments are considered).
`python.testing.pyTestEnabled` | Whether to enable or disable unit testing using pytest (enables or disables test discovery for Test Explorer).
`python.testing.pytestPath` | Path to pytest executable or a pytest compatible module.
`python.testing.pyTestArgs` | Arguments passed to the pytest. Each argument is a separate item in the array.
`python.testing.autoTestDiscoverOnSaveEnabled` | When `true` tests will be automatically rediscovered when saving a test file.
`pythonTestExplorer.testFramework` | Test framework to use (overrides Python extension properties `python.testing.unittestEnabled` and `python.testing.pyTestEnabled`).
`pythonTestExplorer.testplanPath` | Relative path to testplan main suite.
`pythonTestExplorer.testplanArgs` | Arguments passed in. Each argument is a separate item in the array.
`pythonTestExplorer.testplanUseLegacyDiscovery` | Use old style of test listing for discovery _(compatible with older versions of Testplan)_
`pythonTestExplorer.testplanEnabled` | Enable testing using Testplan. _Note that Testplan is only supported for Python 3.7+._
`pythonTestExplorer.outputs.collectOutputs` | Collect test run outputs in separate output channel.
`pythonTestExplorer.outputs.showOutputsOnRun` | Activate test outputs channel on run.


Configuration supports a placeholders for the workspace folder as `${workspaceFolder}` and environment variables in a form of `${env:YOUR_ENVIRONMENT_VARIABLE}`.
Expand Down
Loading
Loading