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

Datastore functionality does not work #227

Closed
Debashis9012 opened this issue Aug 2, 2019 · 2 comments · Fixed by #369
Closed

Datastore functionality does not work #227

Debashis9012 opened this issue Aug 2, 2019 · 2 comments · Fixed by #369
Assignees
Labels

Comments

@Debashis9012
Copy link
Contributor

Excepted Result
Using datastore functionality we should able to share data in scenario, spec and suite level.

Actual Result
Datastore functionality does not work. While fetching key, value is showing as null.
Kindly find the below console output:

Running tool: gauge run /Users/js2/specs/example copy.spec --simple-console --hide-suggestion
(node:5326) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
# Specification Heading
  ## Vowel counts in single word
Key value in scenario level is null
  ## Vowel counts in multiple word
Key value in scenario level is null
Key value in spec level is null

Key value in suite lavel is null
Successfully generated html-report to => /Users/js2/reports/html-report/index.html
Specifications:	1 executed	1 passed	0 failed	0 skipped
Scenarios:	2 executed	2 passed	0 failed	0 skipped

Total time taken: 41ms
Success: Tests passed.

Tested version:

Gauge version: 1.0.6.nightly-2019-07-19
Commit Hash: c215a9f
Plugins
-------
js (2.3.6.nightly-2019-07-22)
@sriv
Copy link
Member

sriv commented Aug 2, 2019

@Debashis9012 please share the spec and implementation used to check this. Datastores can fetch only values that are written previously.

@BugDiver
Copy link
Member

BugDiver commented Aug 2, 2019

This issue happens with gauge-js. When we add a key-value in beforeScenario and try to access it in afterScenario.

In gauge-js the data stores are being cleared even before running the After* hooks.
The issue is at https://github.com/getgauge/gauge-js/blob/master/src/message-processor.js#L119-L122

@BugDiver BugDiver self-assigned this Jul 22, 2020
BugDiver pushed a commit that referenced this issue Jul 23, 2020
Signed-off-by: BugDiver <vinaysh@thoughtworks.com>
@sriv sriv closed this as completed in #369 Jul 23, 2020
sriv pushed a commit that referenced this issue Jul 23, 2020
Signed-off-by: BugDiver <vinaysh@thoughtworks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants