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

Concept arguments not showing up in step text. #5

Closed
ConfusedSky opened this issue Jan 23, 2019 · 6 comments
Closed

Concept arguments not showing up in step text. #5

ConfusedSky opened this issue Jan 23, 2019 · 6 comments

Comments

@ConfusedSky
Copy link

ConfusedSky commented Jan 23, 2019

When using a concept the parameters that are passed in don't show up anywhere in the json report. For example

## Login with concept
* Log into github as "TacoTestAccount" using password "testAcountPassword".

shows up in the report as is with no substitution

"itemType": "concept",
    "conceptStep": {
        "itemType": "step",
        "stepText": "Log into github as \u003cusername\u003e using password \u003cpassword\u003e.",
        "table": null,
        "beforeStepHookFailure": null,
        "afterStepHookFailure": null,
        "result": {
            "status": "pass",
            "stackTrace": "",
	    "screenshot": "",
	    "errorMessage": "",
	    "executionTime": 9317,
	    "skippedReason": "",
	    "messages": [],
	    "errorType": "assertion"
}

Expected Behaviour

Have some way to determine what was passed into the concept. Either through the step text or as another json property.

Version

Gauge version: 1.0.3
Commit Hash: ff6c0c3

Plugins
-------
flash (0.0.1)
html-report (4.0.6)
js (2.3.2)
json-report (0.2.2)
python (0.3.4)
screenshot (0.0.1)
xml-report (0.2.1)
@apoorvam
Copy link
Member

apoorvam commented Mar 5, 2019

@ConfusedSky I have now added a new field Parameters in step to include all the various types of parameters with their values, including static parameters, dynamic, table and special params.

Example:

{
	"itemType": "step",
	"stepText": "The word \u003cword\u003e has \"3\" vowels.",
	"parameters": [{
			"parameterType": "dynamic",
			"name": "word",
			"value": "gauge",
			"table": null
		},
		{
			"parameterType": "static",
			"name": "",
			"value": "3",
			"table": null
		}
	],
	"beforeStepHookFailure": null,
	"afterStepHookFailure": null,
	"result": {
		"status": "pass",
		"stackTrace": "",
		"screenshot": "",
		"errorMessage": "",
		"executionTime": 0,
		"skippedReason": "",
		"messages": [],
		"errorType": "assertion"
	}
}

You can checkout full schema here:
https://apoorvam.github.io/json-report/
The field table which was present earlier inside a step is removed, since it will be included in parameters.

Will make a release with these changes soon. Let me know what you think.

@ConfusedSky
Copy link
Author

Thanks! This is exactly what I was looking for. I appreciate the hard work!

@apoorvam
Copy link
Member

apoorvam commented Mar 5, 2019

Great! @ConfusedSky Can you please let me know your use case of using json-report with Gauge? It helps me understand the applications of it more.

@ConfusedSky
Copy link
Author

I use it to get a historical baseline of test performance. I have it categorized by spec, scenario, and step. So I can see which steps themselves take the most time.

Parameterized steps would often have the highest variance in duration but there was no way of determining what the problem parameters were from the json-report alone, until now.

@apoorvam
Copy link
Member

apoorvam commented Mar 8, 2019

@ConfusedSky Thanks for that. json-report (0.3.0) is now released with this enhancement. Give it a try! Closing this issue now :)

@apoorvam apoorvam closed this as completed Mar 8, 2019
@ConfusedSky
Copy link
Author

Following up, everything is looking good! I appreciate the effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants