Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Implementation of testing api for testing vscode extensions language features [Part 2] #802

Merged
merged 16 commits into from
Sep 10, 2020

Conversation

svor
Copy link
Contributor

@svor svor commented Jul 10, 2020

What does this PR do?

This PR is based on #597 and was created to continue work on the task about providing language's TestAPI.

It introduces testing API that allows you to talk to a specific vscode extensions language features. It gives the ability to create tests that call into a vscode language extension for two reasons:

Tests can be run against newer version of language plugins so we know if a language plugin can be updated or something needs to be fixed
Che tests can talk directly with the language server so we know that if the language server request fails then it's an actual failure, rather than a test failing for a different reason and making it look like it was the cause
Examples of such tests can be found in: https://github.com/che-incubator/Che-Java-Tests

What issues does this PR fix or reference?

eclipse-che/che#14409
partially eclipse-che/che#15797

JPinkney and others added 5 commits February 18, 2020 18:32
Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>
Signed-off-by: svor <vsvydenk@redhat.com>
Signed-off-by: svor <vsvydenk@redhat.com>
Signed-off-by: svor <vsvydenk@redhat.com>
Signed-off-by: svor <vsvydenk@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Jul 10, 2020

❌ E2E Happy path tests failed ❗

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:802
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:802

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@svor
Copy link
Contributor Author

svor commented Jul 27, 2020

crw-ci-test

@che-bot
Copy link
Contributor

che-bot commented Jul 27, 2020

❌ E2E Happy path tests failed ❗

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:802
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:802

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

Copy link
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

still requiring changes:

  • move it to '@eclipse-che/plugin' , languages namespace or tests
  • cleanup dependencies and dev-dependencies
  • re-use most of declarations from existing vscode/theia .d.ts
  • it is not enabled on any che-theia assembly.

Signed-off-by: svor <vsvydenk@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Jul 30, 2020

❌ E2E Happy path tests failed ❗

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:802
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:802

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Aug 3, 2020

❌ E2E Happy path tests failed ❗

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:802
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:802

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

Signed-off-by: svor <vsvydenk@redhat.com>
Signed-off-by: svor <vsvydenk@redhat.com>
Signed-off-by: svor <vsvydenk@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Aug 12, 2020

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:802
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:802

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

…nents

Signed-off-by: svor <vsvydenk@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Aug 12, 2020

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:802
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:802

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

Signed-off-by: svor <vsvydenk@redhat.com>
@svor
Copy link
Contributor Author

svor commented Aug 20, 2020

@benoitf PR was updated to re-use declarations from theia.d.ts, could you please take another look

@che-bot
Copy link
Contributor

che-bot commented Aug 20, 2020

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:802
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:802

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

@benoitf benoitf dismissed their stale review August 20, 2020 09:43

lot of changes have been done, cancelling my request for changes

@benoitf
Copy link
Contributor

benoitf commented Aug 20, 2020

@svor : do you have a testing plug-in that you're using ?

like a given branch of https://github.com/che-incubator/Che-Java-Tests or I can use master branch from there ?

@svor
Copy link
Contributor Author

svor commented Aug 20, 2020

@benoitf test plugin is not ready yet, i'm working on adapting it

@svor
Copy link
Contributor Author

svor commented Aug 20, 2020

@benoitf
Branch with adapted tests is https://github.com/svor/che-java-tests/tree/sv/tests but it is still in progress
here is a video about how it looks when running tests inside che-the: https://youtu.be/vT0eSgexYB0

Signed-off-by: svor <vsvydenk@redhat.com>
@svor
Copy link
Contributor Author

svor commented Aug 21, 2020

To run tests from test plugin use this devfile:

apiVersion: 1.0.0
metadata:
  name: che-java-sample-tests
components:
  - id: redhat/java11/latest
    type: chePlugin
  - reference: https://raw.githubusercontent.com/svor/che-java-tests/sv/tests/meta.yaml
    type: chePlugin
  - reference: https://raw.githubusercontent.com/svor/che-plugin-registry/sv/che-theia2/v3/plugins/eclipse/che-theia/next/meta.yaml
    memoryLimit: 1024Mi
    type: cheEditor

@che-bot
Copy link
Contributor

che-bot commented Aug 21, 2020

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:802
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:802

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

Copy link
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

oups, it seems my review was not published
clicking submit now

Signed-off-by: svor <vsvydenk@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Sep 8, 2020

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:802
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:802

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

Copy link
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

tested on a custom che instance

@svor svor merged commit 468b008 into eclipse-che:master Sep 10, 2020
@che-bot che-bot added this to the 7.19 milestone Sep 10, 2020
monaka pushed a commit to PizzaFactory/che-theia that referenced this pull request Sep 11, 2020
…features [Part 2] (eclipse-che#802)

* Added extension testing

Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>

* Fix build errors

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* Add selectionRange language action

Signed-off-by: svor <vsvydenk@redhat.com>

* Move language test API under che namespace

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* use thei.Uri instead of plugin-ext/lib/common/uri-components.UriComponents

Signed-off-by: svor <vsvydenk@redhat.com>

* Update language test api to use types from theia/plugin

Signed-off-by: svor <vsvydenk@redhat.com>

* Fix declaration request

Signed-off-by: svor <vsvydenk@redhat.com>

* code cleanup

Signed-off-by: svor <vsvydenk@redhat.com>

Co-authored-by: Josh Pinkney <joshpinkney@gmail.com>
monaka pushed a commit to PizzaFactory/che-theia that referenced this pull request Sep 11, 2020
…features [Part 2] (eclipse-che#802)

* Added extension testing

Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>

* Fix build errors

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* Add selectionRange language action

Signed-off-by: svor <vsvydenk@redhat.com>

* Move language test API under che namespace

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* use thei.Uri instead of plugin-ext/lib/common/uri-components.UriComponents

Signed-off-by: svor <vsvydenk@redhat.com>

* Update language test api to use types from theia/plugin

Signed-off-by: svor <vsvydenk@redhat.com>

* Fix declaration request

Signed-off-by: svor <vsvydenk@redhat.com>

* code cleanup

Signed-off-by: svor <vsvydenk@redhat.com>

Co-authored-by: Josh Pinkney <joshpinkney@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants