Skip to content

Test Plan

Sheng Chen edited this page Feb 10, 2020 · 17 revisions

Feature Test Plan

Test platform

  • Windows
  • macOS
  • Linux

Scenarios

Basic

  1. Open https://github.com/redhat-developer/vscode-java/tree/master/test/resources/projects/eclipse/simple-app.

  2. After the language server is initialized, check the status bar icon is πŸ‘, and the problems view has two errors.

  3. Select Foo.java file, invoke class code snippet to generate code as below and the problem view error number is reduced to 1.

    package app;
    
    /**
    * Foo
    */
    public class Foo {
    
    
    }
  4. Click the remain error in the diagnostic window, the code action icon should pop up both on the problems view and the side bar of the editor. Select the code action of Create method 'call()' in type 'Foo' to fix the error.

  5. Save all the files, and invoke VSCode command Java: Force Java compilation. There should be no errors.

  6. Typing the following file of code into the App.main method, the completion should work for File and there should be two errors in the problem view.

    File f = new File("demo.txt");
  7. Organize Imports:

    • Invoke the context menu command Source Action... ==> Organize Imports, there should be only one warning remains in the problem view.
    • You also can type F1 -> Organize Imports, it should have the same result.

Maven

  1. Open https://github.com/redhat-developer/vscode-java/tree/master/test/resources/projects/maven/salut.
  2. After the language server is initialized, check the status bar icon is πŸ‘, and the problems views has several warnings but without errors.
  3. Editing experience is correctly working including diagnostics, code completion and code actions.

Maven - Multimodule

  1. Open https://github.com/redhat-developer/vscode-java/tree/master/test/resources/projects/maven/multimodule.
  2. After the language server is initialized, check the status bar icon is πŸ‘, and there should be no errors/warning in the problems view.
  3. Open Foo.java file, make sure the editing experience is correctly working including diagnostics, code completion and code action on both modules.
    • module1\Foo.java
    • module2\Foo.java

Gradle

  1. Open https://github.com/redhat-developer/vscode-java/tree/master/test/resources/projects/gradle/simple-gradle
  2. After the language server is initialized, check the status bar icon is πŸ‘, and there should be no errors/problems in the problems view.
  3. Open Foo.java file, make sure the editing experience is correctly working including diagnostics, code completion and code action

Maven - Java 11

  1. Install JDK 11, and change the VSCode java.home to the JDK 11 path.
  2. Open https://github.com/redhat-developer/vscode-java/tree/master/test/resources/projects/maven/salut-java11.
  3. After the language server is initialized, check the status bar icon is πŸ‘, and there should be no errors/problems in the problems view.
  4. Open Bar.java, make sure the editing experience is correctly working including diagnostics, code completion and code action

Gradle - Java 11

  1. Install JDK 11.
  2. Open https://github.com/redhat-developer/vscode-java/tree/master/test/resources/projects/gradle/gradle-11.
  3. After the language server is initialized, check the status bar icon is πŸ‘, and there should be no errors/problems in the problems view.
  4. Open Foo.java file, make sure the editing experience is correctly working including diagnostics, code completion and code action.

Single file

  1. Open/Create an empty folder
  2. Add a new Java file, name it Test.java. Check the language server is initialized, and the status bar icon is πŸ‘ after that.
  3. Type code snippet class to generate the class body, type main to generate the main methods.
  4. In the Test.java file, make sure the editing experience is correctly working including diagnostics, code completion and code action.

Third-party plugin compatibility

Visual Studio IntelliCode

  • Make sure auto completion works well.

Debugger for Java

  • Can start debug sessions for the following projects:
    • Maven
    • Gradle
    • Standalone (invisible)
    • Multi-Root
    • Encoding

Java Test Runner

Open the project: https://github.com/junit-team/junit5-samples/tree/master/junit5-migration-maven

  1. The test explorer can show test case.
  2. Can run the test cases by clicking Run All in test explorer
  3. Open a Java test file, the Code Lens could show above each test cases
  4. Can run the test cases by clicking the Run Test Code Lens

Maven for Java

  • The feature: Resovle unknown type works well

Java Dependency Viewer

Open the project: https://github.com/junit-team/junit5-samples/tree/master/junit5-migration-maven

  • The dependency explorer can show:
    • Sources
    • JDK libraries
    • Maven Dependencies

Open the project: https://github.com/bsaby/invisble-project

  • The libraries could be added/removed by clicking buttons in the dependency explorer's Referenced Libraries node.

Clone this wiki locally