From 71716d9ee29a2f157b252925a1bb44be53e9a96b Mon Sep 17 00:00:00 2001 From: Ravi Chande Date: Wed, 7 Feb 2018 13:23:14 -0800 Subject: [PATCH 1/4] Initial manual validation plan --- test-plan.md | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 test-plan.md diff --git a/test-plan.md b/test-plan.md new file mode 100644 index 0000000000..3e4fbe0206 --- /dev/null +++ b/test-plan.md @@ -0,0 +1,98 @@ +# Validating C# Extension for VS Code + +#### Opening projects +When you open a directory in VS Code, the C# extension should look for a .csproj or .sln file in that directory and use "OmniSharp" to load it. +If you look in "Output > Omnisharp Log" a bunch of information should be printed about what copy of MSBuild was used and what projects were load + +Project types to test: +* Standalone csproj +* Directory containing .sln file that references csprojs--projects should be loaded +* .NET Core/.NET Standard csproj +* (Windows) Desktop .NET projects + +The easist way to verify that a project was successfully loaded is to open a .cs file within it and verify that the references codelens indicator appears. + +#### Specific projects to test opening (on all OSes): +* `dotnet new console` in a directory +* A more complex dotnet solution, eg. [1] +* A console app solution created in Visual Studio + +#### Intellisense +* The completion list in a file contains symbols defined in references and in the file +* If you write a documentation comment on a symbol, the completion list displays it + +#### Signature Help +* Signature Help shows up in a method call after typing `(` +* Signature help shows documentation for methods and for parameters + +#### Quick Info +* Hovering over an identifier shows info and documentation + +#### Formatting +* The "Format Document" command works +* Pressing enter inside a method body automatically indents the new line + +#### Go To Definition +* F12 from callsites to definition +* Ctrl-Click +* Can go to metadata for symbols defined in metadata + +#### Go To Implementation +* Ctrl-F12 on virtual member shows implementations + +#### Find All References +* Shift-F12 on a symbol shows a reference list + +### Reference highlighting +* Clicking on a symbol name should highlight other references to it in the same file + +#### Colorization +* Appropriate colorization of keywords, literals, identifiers + +#### Error squiggles +* Introducing an error should show a squiggle in the editor and an error message in the "problems" window +* Messages in the "problems" window should appear only once per unique error (see https://github.com/OmniSharp/omnisharp-vscode/issues/1830) + +#### Quick Fixes +* Add using should be availble (does not currently suppport adding references) +* Generate variable/generate method should show up for missing members +* Remove unncessary usings should show up +* (this is not an exhaustive list) + +#### Refactorings +* `Use expression body for methods` should be available +* `Rename file to match type` should correctly rename the file. The renamed file should be open after the refactoring +* (this is not an exhaustive list) + +#### Code Lens +* References codelens appears on symbols and shows correct Find All References results +* In unit tests projects, the "run test" and "debug test" codelens appears on test methods + * Clicking runs or debugs the test and prints results to the console + +#### Symbol Finder +* Ctrl-T can find symbols by name when you type them + * Symbols have appropriate glyphs + +#### Rename +* Rename can rename symbols + +#### File Watching +* In a project that uses globbing (.NET Core), use the VS Code file explorer to add a new file next to the csproj. Intellisense/sighelp/etc should be available in the new file +* Add a new file and reference a type in it from a different file. Deleting from disk the file containing the referenced type should produce error messages + +[1] For example, +``` +mkdir project +mkdir test +dotnet new console -o project +dotnet new xunit -o test +dotnet add test\test.csproj reference project\project.csproj +dotnet new solution -n solution +dotnet sln solution.sln add test\test.csproj project\project.csproj +``` + + + + + + From 2414cb4e03ba3d33eedca85abdc2a9998d57d38b Mon Sep 17 00:00:00 2001 From: Ravi Chande Date: Wed, 7 Feb 2018 16:06:43 -0800 Subject: [PATCH 2/4] Add info about unity --- test-plan.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test-plan.md b/test-plan.md index 3e4fbe0206..e70ca0c13b 100644 --- a/test-plan.md +++ b/test-plan.md @@ -9,6 +9,7 @@ Project types to test: * Directory containing .sln file that references csprojs--projects should be loaded * .NET Core/.NET Standard csproj * (Windows) Desktop .NET projects +* Unity projects The easist way to verify that a project was successfully loaded is to open a .cs file within it and verify that the references codelens indicator appears. @@ -17,6 +18,10 @@ The easist way to verify that a project was successfully loaded is to open a .cs * A more complex dotnet solution, eg. [1] * A console app solution created in Visual Studio +#### Unity +* Follow the directions at https://code.visualstudio.com/docs/other/unity to configure VS Code with unity +* Try editing a project like https://github.com/staceyhaffner/SuperSpaceShooter + #### Intellisense * The completion list in a file contains symbols defined in references and in the file * If you write a documentation comment on a symbol, the completion list displays it From b83b4cb0e2cbfc9b9f7d876d7d3ddcb455bc551d Mon Sep 17 00:00:00 2001 From: Ravi Chande Date: Wed, 28 Feb 2018 11:25:51 -0800 Subject: [PATCH 3/4] Emphasize test codelens --- test-plan.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test-plan.md b/test-plan.md index e70ca0c13b..3d53b9391c 100644 --- a/test-plan.md +++ b/test-plan.md @@ -69,8 +69,10 @@ The easist way to verify that a project was successfully loaded is to open a .cs * `Rename file to match type` should correctly rename the file. The renamed file should be open after the refactoring * (this is not an exhaustive list) -#### Code Lens +#### Code Lens - References * References codelens appears on symbols and shows correct Find All References results + +#### Code Lens - Unit Tests * In unit tests projects, the "run test" and "debug test" codelens appears on test methods * Clicking runs or debugs the test and prints results to the console @@ -94,10 +96,4 @@ dotnet new xunit -o test dotnet add test\test.csproj reference project\project.csproj dotnet new solution -n solution dotnet sln solution.sln add test\test.csproj project\project.csproj -``` - - - - - - +``` \ No newline at end of file From 29d6aab5c4a165c0d8cd26a5c22c5d8933571da5 Mon Sep 17 00:00:00 2001 From: Ravi Chande Date: Wed, 28 Feb 2018 11:29:16 -0800 Subject: [PATCH 4/4] Add another bullet point --- test-plan.md | 1 + 1 file changed, 1 insertion(+) diff --git a/test-plan.md b/test-plan.md index 3d53b9391c..0d100fa1ed 100644 --- a/test-plan.md +++ b/test-plan.md @@ -75,6 +75,7 @@ The easist way to verify that a project was successfully loaded is to open a .cs #### Code Lens - Unit Tests * In unit tests projects, the "run test" and "debug test" codelens appears on test methods * Clicking runs or debugs the test and prints results to the console + * Breakpoints in a unit test are hit if you "debug test" #### Symbol Finder * Ctrl-T can find symbols by name when you type them