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

Smoke tests in nodejs #7456

Merged
merged 44 commits into from
Sep 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7417bc1
Smoke tests in nodejs
DonJayamanne Sep 18, 2019
8a96bad
Fixes
DonJayamanne Sep 18, 2019
ad0b3da
oops
DonJayamanne Sep 18, 2019
0d86e4c
Use a local repo instead of git repo
DonJayamanne Sep 18, 2019
8d42876
Updated readme
DonJayamanne Sep 18, 2019
2888597
Update readme
DonJayamanne Sep 18, 2019
a08b7c9
Linter fixes
DonJayamanne Sep 18, 2019
952abb0
News entry
DonJayamanne Sep 19, 2019
35eeed4
Refactor
DonJayamanne Sep 19, 2019
ca12fc2
Fixes
DonJayamanne Sep 19, 2019
8cfacd8
Refactor
DonJayamanne Sep 19, 2019
6ec5f78
UI tests
DonJayamanne Sep 19, 2019
aeb617d
CI pipeline changes
DonJayamanne Sep 19, 2019
9c77c9b
ui tests
DonJayamanne Sep 20, 2019
82ea3ef
No experiment and no insider build
DonJayamanne Sep 23, 2019
5ca02ed
oops
DonJayamanne Sep 23, 2019
8b681fc
Rename
DonJayamanne Sep 23, 2019
4c10338
Fixes
DonJayamanne Sep 23, 2019
72c76ab
Verbose logging
DonJayamanne Sep 23, 2019
11c0db5
Hack
DonJayamanne Sep 23, 2019
012c9d0
Verbose logging of ui tests
DonJayamanne Sep 23, 2019
08584a5
Hacky test
DonJayamanne Sep 24, 2019
50379a7
Disable experiments
DonJayamanne Sep 24, 2019
643920c
Oops
DonJayamanne Sep 24, 2019
a86b0c5
Include progress message
DonJayamanne Sep 24, 2019
c8b8fbb
Capture screenshots
DonJayamanne Sep 25, 2019
a03f5cf
Testing
DonJayamanne Sep 25, 2019
21159b4
More smokes
DonJayamanne Sep 25, 2019
f62a974
More screenshots
DonJayamanne Sep 25, 2019
386c437
Oops
DonJayamanne Sep 25, 2019
1fdf09f
Use commands to max and min panels
DonJayamanne Sep 25, 2019
9550161
Fixes
DonJayamanne Sep 25, 2019
887c366
Fixes
DonJayamanne Sep 25, 2019
709ccb5
Fixes
DonJayamanne Sep 25, 2019
3f26971
Add timeout
DonJayamanne Sep 25, 2019
df83a33
More control over test environment
DonJayamanne Sep 25, 2019
92abea0
Fixes to selector
DonJayamanne Sep 25, 2019
d21cb33
Fixes
DonJayamanne Sep 25, 2019
714a32e
No need of comments
DonJayamanne Sep 25, 2019
f22b24b
Smoke in insider as well for testing purposes
DonJayamanne Sep 25, 2019
164f7a9
Fixes
DonJayamanne Sep 26, 2019
406179c
Fixes
DonJayamanne Sep 26, 2019
4f9852f
Comments
DonJayamanne Sep 26, 2019
e22b973
Fixes
DonJayamanne Sep 26, 2019
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
14 changes: 10 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.DS_Store
.huskyrc.json
out
node_modules
log.log
**/node_modules
*.pyc
*.vsix
**/.vscode/.ropeproject/**
Expand All @@ -14,9 +15,10 @@ npm-debug.log
**/.mypy_cache/**
!yarn.lock
coverage/
.vscode-test/**
.vscode test/**
.vscode-smoke/**
cucumber-report.json
**/.vscode-test/**
**/.vscode test/**
**/.vscode-smoke/**
**/.venv*/
port.txt
precommit.hook
Expand All @@ -25,11 +27,15 @@ pythonFiles/lib/**
debug_coverage*/**
languageServer/**
languageServer.*/**
!uitests/features/languageServer/**
!uitests/src/languageServer/**
!uitests/code/**/languageServer/**
bin/**
obj/**
.pytest_cache
tmp/**
.python-version
.vs/
test-results.xml
uitests/out/**
!build/
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@
{
"files.exclude": {
"out": true, // set this to true to hide the "out" folder with the compiled JS files
"uitests/out": true,
"**/*.pyc": true,
".nyc_output": true,
"obj": true,
"bin": true,
"**/__pycache__": true,
"**/node_modules": true,
".vscode-test": false,
".vscode test": false,
"**/.mypy_cache/**": true,
"**/.ropeproject/**": true
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"uitests/out": true,
"**/node_modules": true,
"coverage": true,
"languageServer*/**": true,
".vscode-test": true,
Expand Down
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CODING_STANDARDS.md
CONTRIBUTING.md
CONTRIBUTING - LANGUAGE SERVER.md
coverconfig.json
cucumber-report.json
gulpfile.js
package.datascience-ui.dependencies.json
package-lock.json
Expand Down
13 changes: 11 additions & 2 deletions build/ci/templates/jobs/build_compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,17 @@ jobs:
steps:
- template: ../steps/build.yml

- job: Lint
- job: Hygiene
pool:
vmImage: "macos-latest"
steps:
- template: ../steps/lint.yml
- template: ../steps/initialization.yml
parameters:
PythonVersion: $(PythonVersion)
workingDirectory: $(Build.SourcesDirectory)
compile: 'false'
installVSCEorNPX: 'false'

- bash: npx tslint --project tsconfig.json
displayName: "Lint"
workingDirectory: $(Build.SourcesDirectory)
31 changes: 31 additions & 0 deletions build/ci/templates/jobs/build_uitests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Compile and build uitests

jobs:
- job: Compile
pool:
vmImage: "macos-latest"
steps:
- template: ../steps/initialization.yml
parameters:
workingDirectory: $(Build.SourcesDirectory)/uitests
compile: 'true'
installVSCEorNPX: 'false'


- job: Hygiene
pool:
vmImage: "macos-latest"
steps:
- template: ../steps/initialization.yml
parameters:
workingDirectory: $(Build.SourcesDirectory)/uitests
compile: 'false'
installVSCEorNPX: 'false'

- bash: npx tslint --project tsconfig.json
displayName: "Lint"
workingDirectory: $(Build.SourcesDirectory)/uitests

- bash: npx prettier --check 'src/**/*.ts'
displayName: "Format"
workingDirectory: $(Build.SourcesDirectory)/uitests
47 changes: 47 additions & 0 deletions build/ci/templates/jobs/merge_upload_uitest_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Overview:
# Generic jobs template to compile and build extension

jobs:
- job: UI_Test_Report
timeoutInMinutes: 90
pool:
vmImage: "macos-latest"
steps:
- template: ../steps/initialization.yml
parameters:
workingDirectory: $(Build.SourcesDirectory)/uitests
compile: 'true'

- bash: mkdir -p reports
workingDirectory: $(Build.SourcesDirectory)/uitests
displayName: "Create Reports Directory"

- task: DownloadBuildArtifacts@0
inputs:
buildType: "current"
allowPartiallySucceededBuilds: true
downloadType: "Specific"
itemPattern: "**/.vscode test/reports/cucumber_report_*.json"
downloadPath: "$(Build.SourcesDirectory)/uitests/reports"
displayName: "Restore Cucumber Reports"
condition: always()

- bash: node ./out/index.js report --jsonDir=./reports --htmlOutput=./reports
workingDirectory: $(Build.SourcesDirectory)/uitests
displayName: "Merge and generate report"
condition: always()

- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)/uitests/reports
contents: "**"
targetFolder: $(Build.ArtifactStagingDirectory)
displayName: "Copy Report"
condition: always()

- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: UIReport
displayName: "Publish Report"
condition: always()
35 changes: 16 additions & 19 deletions build/ci/templates/jobs/uitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
# parameters:
# jobs:
# - test: "Smoke"
# tags: "--tags=@smoke"
# tags: "@smoke"
# - test: "Test"
# tags: "--tags=@test"
# tags: "@test"
# - test: "Terminal"
# tags: "--tags=@terminal"
# tags: "@terminal"
# ```
# Based on this sample, we're running 3 tests with the names `Smoke`, `Test`, and `Terminal`.
# The tags inside each test contains the arguments that needs to be passd into behave.
# I.e. we're only testing BDD tests that contain the tag `@smoke`, `@test` & `@terminal` (as separate jobs).
# Please pass in just the `tags` arguments.
# Multiple tag values can be passed in as follows:
# tags: "--tags=@debug --tags=@remote"
# tags: "@debug and @remote"
# More information on --tags argument for behave can be found here:
# * https://behave.readthedocs.io/en/latest/tutorial.html#controlling-things-with-tags
# * https://behave.readthedocs.io/en/latest/tag_expressions.html
Expand All @@ -52,7 +52,7 @@
# vscodeChannels: ['stable']
# jobs:
# - test: "Smoke"
# tags: "--tags=@smoke"
# tags: "@smoke"
# ignorePythonVersions: "3.6,3.5"
# ```
# Based on this sample, we're running 1 test with the name `Smoke`.
Expand All @@ -73,7 +73,7 @@
# vscodeChannels: ['stable']
# jobs:
# - test: "Smoke"
# tags: "--tags=@smoke"
# tags: "@smoke"
# ignorePythonVersions: "3.6,3.5"
# ```
# Based on this sample, we're running 1 test with the name `Smoke`.
Expand All @@ -93,36 +93,33 @@ parameters:
vscodeChannels: ['stable', 'insider']
pythonVersions: [
{
"version": "3.7",
"version": "3.7.4",
"displayName": "37",
"excludeTags": "--tags=~@python3.6 --tags=~@python3.5 --tags=~@python2"
"excludeTags": "not @python3.6 and not @python3.5 and not @python2"
},
{
"version": "3.6",
"displayName": "36",
"excludeTags": "--tags=~@python3.7 --tags=~@python3.5 --tags=~@python2"
"excludeTags": "not @python3.7 and not @python3.5 and not @python2 and not @noNeedToTestInAllPython"
},
{
"version": "3.5",
"displayName": "35",
"excludeTags": "--tags=~@python3.7 --tags=~@python3.6 --tags=~@python2"
"excludeTags": "not @python3.7 and not @python3.6 and not @python2 and not @noNeedToTestInAllPython"
},
{
"version": "2.7",
"displayName": "27",
"excludeTags": "--tags=~@python3.7 --tags=~@python3.5 --tags=~@python3"
"excludeTags": "not @python3.7 and not @python3.5 and not @python3 and not @noNeedToTestInAllPython"
}
]


jobs:
- job: UITest
dependsOn:
- Compile
- Build
# Remember, some tests can take easily an hour (the `tests` features take just around 1 hour).
timeoutInMinutes: 90
# Build our matrix (permutations of all environments & tests).
# Build our matrix (permutations of VS Code + Tests + Pyhton + OS).
strategy:
matrix:
${{ each channel in parameters.vscodeChannels }}:
Expand All @@ -134,24 +131,24 @@ jobs:
PythonVersion: ${{ py.version }}
VMImageName: "macos-latest"
VSCodeChannel: ${{ channel }}
Tags: ${{ format('{0} {1} --tags=~@win --tags=~@linux', job.tags, py.excludeTags) }}
Tags: ${{ format('{0} and {1} and not @win and not @linux', job.tags, py.excludeTags) }}

${{ if not(contains(coalesce(job.ignoreOperatingSystems, ''), 'win')) }}:
${{ format('Win{2}{0}{1}', py.displayName, job.test, channel) }}:
PythonVersion: ${{ py.version }}
VSCodeChannel: ${{ channel }}
VMImageName: "vs2017-win2016"
Tags: ${{ format('{0} {1} --tags=~@mac --tags=~@linux', job.tags, py.excludeTags) }}
Tags: ${{ format('{0} and {1} and not @mac and not @linux', job.tags, py.excludeTags) }}

${{ if not(contains(coalesce(job.ignoreOperatingSystems, ''), 'linux')) }}:
${{ format('Linux{2}{0}{1}', py.displayName, job.test, channel) }}:
PythonVersion: ${{ py.version }}
VSCodeChannel: ${{ channel }}
VMImageName: "ubuntu-latest"
Tags: ${{ format('{0} {1} --tags=~@mac --tags=~@win', job.tags, py.excludeTags) }}
Tags: ${{ format('{0} and {1} and not @mac and not @win', job.tags, py.excludeTags) }}

pool:
vmImage: $(VMImageName)

steps:
- template: uitest_phases.yml
- template: ../steps/uitest.yml
13 changes: 0 additions & 13 deletions build/ci/templates/steps/lint.yml

This file was deleted.

Loading