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

api integration tests #6852

Merged
merged 3 commits into from
Jan 22, 2020
Merged

api integration tests #6852

merged 3 commits into from
Jan 22, 2020

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Jan 9, 2020

What it does

New docs rendered:

fix #6409

  • ci integration
  • browser integration (rewrite UI tests)
  • expose loader source map handling
  • electron integration - out of scope, needs Electron 5, tracked in [tests] Improve electron example tests #317 (comment)
  • theia cli integration -> theia test to run tests
  • separate generated webpack config from default and make expose-loader optional only when someone wants to add tests
  • coverage report - https://github.com/istanbuljs/puppeteer-to-istanbul
    • only against bundled files, without remapping to original sources
    • lcov reporting does not work
    • see api tests coverage #6892 as a follow-up
  • concurrent page testing -> one can write own script which spawn multiple servers and run different test suites on them
  • different VS Code extensions testing -> all theia options are supported, so one can pass --plugins directly to theia test command
  • extract reusable tests for theia apps -> published under @theia/api-tests
  • doc how to develop, run and debug integration tests, what to test and what not
  • CHANGELOG update
  • clean up ci scripts from chrome installation and so on

How to test

  • Run yarn test in examples/browser to run integration tests.
  • Run yarn test:debug in examples/browser to debug integration tests. A new chrome instance will be opened. Refresh to rerun tests and grep query param to filter tests.

Review checklist

Reminder for reviewers

@akosyakov akosyakov added ci issues related to CI / tests test issues related to unit and api tests labels Jan 9, 2020
@akosyakov
Copy link
Member Author

This PR already replaces old UI wdio test with API based tests which actually find timing issues with our APIs, memory leaks in react scm and git extensions and make shell API more complete.

@akosyakov akosyakov force-pushed the ak/integration_tests branch 8 times, most recently from c9f0f1e to d1bb378 Compare January 14, 2020 08:17
@akosyakov akosyakov force-pushed the ak/integration_tests branch 4 times, most recently from 7ab3c06 to 3392f1d Compare January 14, 2020 08:52
@akosyakov akosyakov force-pushed the ak/integration_tests branch 2 times, most recently from bf1af24 to 89ce6d5 Compare January 15, 2020 08:59
@akosyakov akosyakov mentioned this pull request Jan 16, 2020
@akosyakov akosyakov force-pushed the ak/integration_tests branch 3 times, most recently from b3e0c10 to de694dc Compare January 16, 2020 07:05
@akosyakov akosyakov changed the title WIP api integration tests api integration tests Jan 16, 2020
@akosyakov akosyakov marked this pull request as ready for review January 16, 2020 07:08
Copy link
Contributor

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty cool! Is it possible to write tests in typescript as well?

@akosyakov
Copy link
Member Author

Is it possible to write tests in typescript as well?

I suppose so, if it compiles to code which can be executed by chrome, keeps requires and does not need any 3rd party deps then it should work. I have not done it because ts-check became very good. The whole webpack repo for example checked with this without any compilation. But i can switch if you want.

@akosyakov
Copy link
Member Author

I'm merging if the build is green, will add more monaco tests in gitlens PR for newly exposed api.

@akosyakov
Copy link
Member Author

@eclipse-theia/ecd-theia-committers Travis does not seem to pick up my latest commits, does anyone know what can be done to trigger the build?

@marcdumais-work
Copy link
Contributor

marcdumais-work commented Jan 22, 2020

@eclipse-theia/ecd-theia-committers Travis does not seem to pick up my latest commits, does anyone know what can be done to trigger the build?

Probably something is wrong with Travis ATM. I restarted the job that failed for the latest commit on master, and after a few minutes it's still in Waiting to be queued state:

https://travis-ci.com/eclipse-theia/theia/jobs/278277336

update: it has started now.

Maybe you can amend your top PR commit so the SHA changes and force-push: hopefully that will wake travis up.

Copy link
Member

@paul-marechal paul-marechal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .travis file is broken :)

.travis.yml Show resolved Hide resolved
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci issues related to CI / tests test issues related to unit and api tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration Test Framework
4 participants