Giter VIP home page Giter VIP logo

gauge-vscode's People

Contributors

apoorva-ga avatar at6ue avatar bockstaller avatar carlowahlstedt avatar chadlwilson avatar debashis9012 avatar dependabot-preview[bot] avatar dependabot[bot] avatar kashishm avatar luciferankon avatar negidharmendra avatar nehashri avatar nivedhasenthil avatar preetipadalia avatar riju91 avatar shubhamsc avatar sriv avatar zabil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gauge-vscode's Issues

Documentation for VS Code support

Looking for a document regarding the features supported by gauge plugin for VSCode.
Can you please guide me to the corresponding link?

Couldn't start client langserver

Expected behavior
Give a better error

Actual behavior
Getting error Couldn't start client langserver

Steps to replicate

  • Gauge core is not installed
  • plugins are installed
  • Open VSCode - Getting the error Couldn't start client langserver.
    Instead this can be an info. Cannot find gauge binary. Show the install gauge button.

Getting a null pointer exception while executing tests

Expected behavior
Should be able to execute gauge tests

Actual behavior
Getting a null pointer exception

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x20 pc=0x71fe1d]

goroutine 1 [running]:
github.com/getgauge/gauge/util.FindConceptFilesIn.func1(0xc04213c690, 0x28, 0x0, 0x0, 0xc042129500)
        src/github.com/getgauge/gauge/util/fileUtils.go:103 +0x2d
github.com/getgauge/gauge/vendor/github.com/getgauge/common.FindFilesInDir.func1(0xc04213c690, 0x28, 0x0, 0x0, 0xc29020, 0xc04213c6f0, 0x0, 0x0)
        src/github.com/getgauge/gauge/vendor/github.com/getgauge/common/common.go:170 +0x71
path/filepath.walk(0xc0420fa940, 0x20, 0xc321a0, 0xc0421290e0, 0xc0420fa720, 0x0, 0x0)
        /usr/local/Cellar/go/1.8.3/libexec/src/path/filepath/path.go:372 +0x305
path/filepath.walk(0xc0420fa6e0, 0x1a, 0xc321a0, 0xc0421283c0, 0xc0420fa720, 0x0, 0x20)
        /usr/local/Cellar/go/1.8.3/libexec/src/path/filepath/path.go:376 +0x41b
path/filepath.Walk(0xc0420fa6e0, 0x1a, 0xc0420fa720, 0xc0420fa6e0, 0x1a)
        /usr/local/Cellar/go/1.8.3/libexec/src/path/filepath/path.go:398 +0x153
github.com/getgauge/gauge/vendor/github.com/getgauge/common.FindFilesInDir(0xc0420fa6e0, 0x1a, 0x9e17e0, 0x9e17d0, 0x0, 0x0, 0x9)
        src/github.com/getgauge/gauge/vendor/github.com/getgauge/common/common.go:177 +0xe9
github.com/getgauge/gauge/util.findFilesIn(0xc0420fa600, 0x1a, 0x9e17e0, 0x9e17d0, 0x1a, 0x0, 0x0)
        src/github.com/getgauge/gauge/util/fileUtils.go:83 +0x68
github.com/getgauge/gauge/util.FindConceptFilesIn(0xc0420fa600, 0x1a, 0xc0420fa600, 0x1a, 0x0)
        src/github.com/getgauge/gauge/util/fileUtils.go:108 +0x59
github.com/getgauge/gauge/util.GetConceptFiles(0x926bc0, 0x0, 0xc0420857d8)
        src/github.com/getgauge/gauge/util/fileUtils.go:175 +0x111
github.com/getgauge/gauge/parser.CreateConceptsDictionary(0xc0421281e0, 0x0)
        src/github.com/getgauge/gauge/parser/conceptParser.go:222 +0xcb
github.com/getgauge/gauge/parser.ParseConcepts(0xc0420e9b00, 0x0)
        src/github.com/getgauge/gauge/parser/parse.go:93 +0x29
github.com/getgauge/gauge/validation.ValidateSpecs(0xc04203b7c0, 0x1, 0x1, 0x0, 0x0)
        src/github.com/getgauge/gauge/validation/validate.go:189 +0x177
github.com/getgauge/gauge/execution.ExecuteSpecs(0xc04203b7c0, 0x1, 0x1, 0x0)
        src/github.com/getgauge/gauge/execution/execute.go:122 +0xb4
github.com/getgauge/gauge/cmd.execute(0xc04203b7c0, 0x1, 0x1)
        src/github.com/getgauge/gauge/cmd/run.go:110 +0x15c
github.com/getgauge/gauge/cmd.glob..func10(0xc5e380, 0xc04203b7c0, 0x1, 0x1)
        src/github.com/getgauge/gauge/cmd/run.go:50 +0xab
github.com/getgauge/gauge/vendor/github.com/spf13/cobra.(*Command).execute(0xc5e380, 0xc04203b780, 0x1, 0x1, 0xc5e380, 0xc04203b780)
        src/github.com/getgauge/gauge/vendor/github.com/spf13/cobra/command.go:651 +0x241
github.com/getgauge/gauge/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc5d280, 0xd, 0xc0420544e8, 0xc0420ce4b0)
        src/github.com/getgauge/gauge/vendor/github.com/spf13/cobra/command.go:726 +0x340
github.com/getgauge/gauge/vendor/github.com/spf13/cobra.(*Command).Execute(0xc5d280, 0x0, 0x17)
        src/github.com/getgauge/gauge/vendor/github.com/spf13/cobra/command.go:685 +0x32
github.com/getgauge/gauge/cmd.Parse(0xc04201c000, 0xc04201c000)
        src/github.com/getgauge/gauge/cmd/cmd.go:97 +0x44
main.main()

Steps to replicate

gauge run specs

This gives the error

Version

Gauge version: 0.9.5.nightly-2017-11-20
Commit Hash: c49041d

Plugins
-------
js (2.0.3.nightly-2017-11-16)

introduce gauge as a language for .cpt and .spec files

Currently, gauge files are interpreted using vscode's markdown support.

This causes .md files to be interpreted as gauge file, even in non-gauge projects.

Proposal:

Introduce a new gauge language, that will use the same markdown grammar to highlight elements, but isolate this to only .spec and .cpt files.

Note:

Existing gauge-vscode features (goto def, find refs, code lens, execution etc.) should all work as before.

[Error] The langserver server crashed 5 times in the last 3 minutes.

Expected behavior
I should be able to work with VSCode seamlessly

Actual behavior
Getting the error The langserver server crashed 5 times in the last 3 minutes. The server will not be restarted.

Steps to replicate

  • Open this project in VSCode
  • Open a couple of specs
    parse-errors.zip
  • We get this error

Version

Gauge version: 0.9.4

Plugins
-------
csharp (0.10.1)
html-report (4.0.2)
java (0.6.6.nightly-2017-09-14)
js (2.0.1)
ruby (0.4.2)
screenshot (0.0.1)
spectacle (0.1.2)
xml-report (0.2.0)

IDE should not show implementation suggestion

Expected behavior
The suggestion to add implementation should be shown only on the command line.

Actual behavior
The suggestion comes up in the IDE

Add the following missing implementations to fix `Step implementation not found` errors.

step("step1", function() {
	throw new Error("Provide custom implementation");
});

Steps to replicate

  • Run a spec with unimplemented step

Version

Gauge version: 0.9.5

Plugins
-------
html-report (4.0.2)
js (2.0.3.nightly-2017-11-08)

Run Scenario in command palette shows unwanted description

VS-Code version: 1.18.1
Gauge Extension Version: 0.0.3

Gauge version: 0.9.5
Commit Hash: f539aef

Plugins
-------
csharp (0.10.1)
go (0.1.1)
html-report (4.0.2)
java (0.6.5.nightly-2017-09-05)
js (2.0.3)
python (0.2.2)
ruby (0.4.2)
screenshot (0.0.1)

Steps to reproduce

  • Open the command palette
  • Search for "Run Scenario"
  • The command pallete lists this command as Run Scenario gauge.execute.scenarios

Expected behavior

  • Remove the text gauge.execute.scenarios

Add a command palette to report issues or give feedback

Add the command "Report Issues" in VS code's command palette to link quickly create a Github issue.

This can be used to capture feedback and report bugs.
This must capture gauge cli and gauge plugin version.

For reference check "Report Issues" command for VS code.

Link to resultant html-report does not work

Expected behavior
I should be able to click on the link to html-report and see the report

Actual behavior
Hover on the link says click to follow. However a Click on the link does nothing

Steps to replicate

  • Run a scenario
  • Click on the link
    Successfully generated html-report to => c:\work\js\reports\html-report

Released Gauge VS code plugin must hide language server output.

Steps to reproduce

  • Install Gauge VS Code plugin
  • Open a gauge project
  • Run a scenario
  • The result of the test run is displayed on the console output
  • Make a change in the spec file
  • The output changes focus to a verbose language server messages.

Expected behavior.

Do not show language server output so that output of running specifications or scenarios is always in focus.

If this is required for debugging make it available only on nightly versions.

Should show stacktrace when exception is thrown

Expected behavior
Should show stacktrace when exception is thrown

Actual behavior

  • does not show the stack trace for throw 'Error'
throw 'Error2'; // generates an exception with a string value
throw 42;       // generates an exception with the value 42
throw true;     // generates an exception with the value true
  • Works for an assertion failure
  • Works for throw new Error('Unimplemented Step');

Version

Gauge version: 0.9.5.nightly-2017-11-23
Commit Hash: 51cfe8d

Plugins
-------
js (2.0.3.nightly-2017-11-23)

Allow users to open html-report post run

After a gauge run, allow the users to open the html-report.

  • This option should be available only if user has html-report plugin installed
  • If overwrite_reports = false then the report for the last run must be opened.

Options:

  • Open report in the user's default browser
    • add a button in the output pane similar to the Add Configuration... button in the launch.json
    • add a link with a command-uri associated with a command that will open the report

This will require use of a node module (ex. node-open).

  • Open report in the preview pane.

This may require a DocumentContentProvider and a DocumentLinkProvider.

For a new project diagnostics and goto definition does not work

Expected behavior
Gauge functionality should work for a new project

Actual behavior
Diagnostics and goto definition does not work

Steps to replicate

  • Create a new project.
  • Open in VS code

Version

Gauge version: 0.9.5.nightly-2017-11-22
Commit Hash: 9432093

Plugins
-------
js (2.0.3.nightly-2017-11-22)

Should not generate stub for empty step text

Expected behavior
If the step text is empty, copy implementation.. should not be displayed.

Actual behavior

step("", async function() {
	throw 'Unimplemented Step';
});

Steps to replicate

  • Type * space and then (Ctrl+.). Copy the stub
  • Paste it in js

Observe the code getting generated for empty text

Version

Gauge version: 0.9.5.nightly-2017-11-15
Commit Hash: 55fe281

Plugins
-------
js (2.0.3.nightly-2017-11-16)

Gauge initialization for .spec and .cpt files

VSCode should consider .spec and .cpt files as markdown, so that all markdown features available in VSCode is activated for .spec and .cpt files too.
VSCode should activate gauge if .spec, .cpt or .md files are opened and the current directory is a gauge project. Gauge daemon should be started to provide LSP features, like code completion, for these files.

[Goto definition] Unable to open an exisiting concpet file

Expected behavior
Using goto definition, I should be able to navigate to the concept.

Actual behavior
From a spec when I try navigating to a concept. I get the error
Unable to open 'abc.cpt': File not found (\\c:\<project_path>\lsp-tests\specs\concepts\abc.cpt).

This file exists in the given path

Steps to replicate

  • Project js.zip
  • Open file some.spec
  • Try navigating to the concept One
  • We get the following error

Version

Gauge version: 0.9.4.nightly-2017-10-09
Commit Hash: 8ef345c

Plugins
-------
csharp (0.10.1)
html-report (4.0.2)
java (0.6.6.nightly-2017-09-14)
js (2.0.1)
ruby (0.4.2)
screenshot (0.0.1)
spectacle (0.1.2)
xml-report (0.2.0)

VS Code - gauge-0.0.1.nightly-2017-10-06

Unable to install using `npm run build`

While installing, I am getting the following error

up to date in 3.668s
sh: vsce: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] build: `npm install && vsce package`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sswaroop/.npm/_logs/2017-08-31T05_56_31_089Z-debug.log

Multiple Gauge Execution Channels created for gauge runs

Expected
Each gauge run (run tests) should show the result in a Gauge Execution output channel window. There should be only one such window. Subsequent run should reuse the same window to display results

Actual
Executing a spec or scenario is creating a new Gauge Execution output channel. There is one window for each execution.

A newly created file should have the basic template in place

A newly created spec file should have

Specification Heading
=====================
Created by <username> on <date>

This is an executable specification file which follows markdown syntax.
Every heading in this file denotes a scenario. Every bulleted point denotes a step.
     
Scenario Heading
----------------

A newly created concept file should have

Created by <user> on <date>

This is a concept file with following syntax for each concept.
# Concept Heading
* step1
* step2

Getting Invalid response and Request timeouts

Expected behavior
I should be able to work with VS Code seamlessly

Actual behavior
Getting Invalid response and Request timout errors on the steps

Steps to replicate

  • Work on the gauge-lsp-tests for a while
  • Keep switching between IDE and command line running tests - multiple times.

Observe these errors occurs after a while

requesttimeout

Version

Gauge version: 0.9.5.nightly-2017-11-23
Commit Hash: 51cfe8d

Plugins
-------
js (2.0.3.nightly-2017-11-23)

Add "Run All Specifications" to command palate

Current behavior

There's no way to run all the specifications in VS code

Expected behavior

Provide a command palate option "Run All Specifications" that will run all Gauge specifications in the current project.

Missing header row in table snippet for .spec file

Current behavior

  • Edit a specification
  • Insert a table snippet

Here's how it's generated

|HEADER|HEADER|HEADER|
|value|value|value|
|value|value|value|

Expected behavior

|HEADER     |HEADER     |   HEADER  |
|-----------|-----------|-----------|
|value      |value      |value      |
|value      |value      |value      |

Link to release notes whenever gauge plugin updates

Plugins in vs code can upgrade automatically.
Whenever gauge plugin updates, show up an info bar, with the message.
"Gauge plugin updated to version 0.4.x" with a button "View release notes" and "Do not show this again"

Clicking "View release notes" takes the user to github releases page for that version.

Handle loading of non-javascript gauge projects.

Steps to reproduce

$ gauge init ruby
$ code .

Open example.spec. All the steps are highlighted as red with the following errors on hover.
"Connection closed 127.0... cause: EOF"
"write tcp 127.0.0.1:42569->127.0.0.1:52118: use of closed network connection"

Expected behavior.

Disable gauge features that don't work for non-javascript projects.

Show usages of a step implementation

Show a code lens over the step implementation that will bring up a usages view.

Acceptance criteria

  • List number of usages above the step implementation
2 references
step("Vowels in English language are <vowels>.", function(vowelsGiven) {
  assert.equal(vowelsGiven, vowels.join(""));
});
  • If the step has multiple implementations then all the implementations should show the usages

Test cases

  • Should list number of usages
  • Multiple implementations should show all the usages

Duplicate scenario definition should have details about the other step

Expected behavior
I should be able to identify the duplicate scenario with the message.

Actual behavior
The current error message has line number details of the current scenario

Steps to replicate

  • Create duplicate Scenario

Version

Gauge version: 0.9.5.nightly-2017-11-22
Commit Hash: 9432093

Plugins
-------
js (2.0.3.nightly-2017-11-22)

Gauge must work when there are multiple gauge projects in workspaces

Expected behavior
When there are multiple workspaces, all the functionality must work.

Acceptance criteria

Goto definition

  • Goto definition must take the user to the implementation within the workspace

Find usages

  • The usage count must be limited to the usages in the workspace. Unless explicitly referenced.

Diagnostics

  • Duplicate Step implementations must be limited to the workspace
  • Duplicate concept definition must be limited to the workspace

Autocomplete
Unless explicitly referenced, the list must be limited to elements in the workspace

  • Steps
  • The tags

Execute

  • Should be able to run specifications of the workspace

Workspace

  • Multiple gauge projects with different language runners
  • A non-gauge project and a gauge project

Generate step implementation stubs

Provide a codeAction on unimplemented steps to generate a method stub and copy it to the clipboard.

For e.g.

* This is a new step

Gets a codeAction option "Copy function stub for this step to clipboard"
Running the codeAction copies following codeto clipboard

step("This is a new step", async function(){
 throw 'Unimplemented Step'; 
});

Add run Scenario/Specification to the Command Palette

Proposed behavior
While editing a Gauge specification Ctrl+Shift+P must display the commands

Out of scope

  • Running multiple specifications

Acceptance criteria

  • "Run Specification" - run currently open specification
  • "Run Scenario at cursor" if a specification is open, run the scenario at the cursor.
  • "Run Scenario" if the cursor is outside all scenarios - show the list of scenarios for selection.

Run Spec and Run Scenario does not work on VS Code insider's edition

  • Use "Add workspace folder" to add multiple gauge projects
  • Try running the specifications or scenarios

insider


Version 1.18.0-insider
Commit f1ee80be081b0d47f4423b9dc5f41a65c36146da
Date 2017-10-13T08:29:25.973Z
Shell 1.7.7
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
$ gauge version
Gauge version: 0.9.4
Commit Hash: 03e62ef

Plugins
-------
csharp (0.10.1)
go (0.1.1)
html-report (4.0.2)
java (0.6.5.nightly-2017-09-05)
js (2.0.2)
python (0.2.2)
ruby (0.4.2)
screenshot (0.0.1)

Diagnostic errors are not displayed when the highest specification folder is not specs

Expected behavior
Diagnostics should appear for gauge files.

Actual behavior
Diagnostics are being displayed only when specs is the highest folder of specifications.

Steps to replicate

  • Create a gauge js project
gauge init js
  • Rename specs to something
  • Open in vscode
  • add an unimplemented step
  • Diagnostic errors are not displayed

Observation run, goto definition are working.

Version

Gauge version: 0.9.5.nightly-2017-11-22
Commit Hash: 9432093

Plugins
-------
js (2.0.3.nightly-2017-11-22)

Executing the previous run from command palette

Proposed behavior
User should be able to repeat the last run

  • "Repeat Last Run" will repeat the last run
  • "Run Scenarios" will list all scenarios for current open spec. It will warn if the current document is not a specification.

Behavior to be retained

  • "Run Specification" - run currently open specification
  • "Run Scenario" if the cursor is outside all scenarios - show the list of scenarios for selection.

Navigate to file with test failures from the console output

Proposed behavior
When a scenario fails, after a run inside VS Code.
The user can click on failure stack trace to navigate to the file and line of failure.

Acceptance criteria

  • If the failure message is
 ## IDE Plugins
        
        Failed Step: Display the IDE plugins
        Specification: specs/example.spec:37
        Error Message: AssertionError: false == true
        Stacktrace: 
        AssertionError: false == true
            at step (tests/step_implementation.js:67:12)
            at process._tickCallback (internal/process/next_tick.js:109:7)

specs/example.spec:37 and tests/step_implementation.js:67:12 must be links that navigate to the line that cause the test failure.

Handle/remove panic runtime errors

Problem
When there is a panic runtime exception from gauge, the gauge process is getting killed in the IDE.

Observations
IDE VSCode gives the error The language server crashed 5 times in the last 3 minutes

Expected behavior
IDE should continue working

Version

Gauge version: 0.9.5.nightly-2017-11-23
Commit Hash: 51cfe8d

Plugins
-------
js (2.0.3.nightly-2017-11-23)
screenshot (0.0.1

Stop execution when the user chooses to

Proposed behavior
User should be able to stop an execution which is started

Actual behavior
There is no way to stop executions

Things to consider

  • User can execute in multiple sessions.

Should handle a project with space in path

Expected behavior
Gauge functionality should work normally when there is a space in the project path

Actual behavior
Getting

09:59:40.267 failed to parse specification <folderpath>\Downloads\test1%!\(MISSING)test1\specs\example.spec

Steps to replicate

  • Create project with space in the path
    test1 1\projectfolder
  • Open VS code.
  • Add an unimplemented step

Observe code action for generating stubs for unimplemented step is not available

Version

Gauge version: 0.9.5.nightly-2017-11-22
Commit Hash: 9432093

Plugins
-------
js (2.0.3.nightly-2017-11-22)

Error for unimplemented steps in Concepts displayed incorrectly

Steps to reproduce

  • Init a gauge js project
$ gauge init js
  • Create a new concept sample.cpt with contents
# This is a concept
* An unimplemented step
  • Use This is a concept in example spec, multiple times

Current behavior

  • The error is not highlighted in sample.cpt
  • The specification header of example.spec displays error with the message 'Step implemetation not found`.
  • The number of error messages = number of time the concept is used in the specification

Expected behavior

  • Highlight the steps with error in the concept file
  • Highlight the concept with error in the specification file

Implement a test explorer for scenarios

Use the Explorer feature is VS code to implement a test explorer.
For e.g. refer Gitlens plugin

testexploere

  • The pane must list all the Specifications (sorted by scenario heading). It must have a search and filter. The search must be fuzzy
  • Clicking on the Specification must open the specification in the editor.
  • The Specification can be run from the explorer

Snippets for gauge

Snippets for specification, scenario and tables should be added for markdown files.
Snippet provided -

Key Snippet
spec Specification Heading
sce Scenario Heading
table:1 Table with 1 column
table:2 Table with 2 columns
table:3 Table with 3 columns
table:4 Table with 4 columns
table:5 Table with 5 columns
table:6 Table with 6 columns

Run failed scenarios

Ctlr-shift-p to display an command "Rerun failed scenario(s)" that will rerun failed scenarios.

Acceptance criteria

  • If a spec has multiple scenarios, only failed scenarios must be re-run
  • If a spec has multiple test cases(data driven by rows). Re-run should run only the failed test case

Test cases

  • If rerun is used when only passed and skipped scenarios are present, then it is considered as a Tests failed
  • Only failed scenarios must be run
  • Only failed test case must be run

Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.