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

Additional details on console while running via command line using tags #389

Closed
kbangur opened this issue May 10, 2016 · 5 comments
Closed

Comments

@kbangur
Copy link

kbangur commented May 10, 2016

Expected behavior

When running gauge specs via command line, we heavily use specs execution based on tags. It would be really nice to have all specifications enlisted on the console before the executions starts. A message on the console like "The following specifications from the directory '\specs' matched the tag: 'ABC, xyz'." would help me understand what specifications are lined up for executions.

Actual behavior

The feature is currently not available

Gauge version

Gauge version: 0.4.0

Plugins
-------
html-report (2.1.0)
java (0.4.0)
@kbangur
Copy link
Author

kbangur commented May 20, 2016

Also I think when running multiple specifications in a single execution, we should give info on the console after each spec execution whether it has passed/failed/skipped so that we do not have to wait untill the end of entire execution to look at the summary for detailed information.

@apoorvam
Copy link
Contributor

Hi @kbangur, We do think it adds value to list out all specs that are ready for execution after applying filters.

Regarding the point on showing spec execution status after every spec, currently we try to convey it by marking steps as red/green based on status. Here is a sample of console execution report in verbose mode.

Do you still think we need to show the spec status after execution? If so, do you have any ideas on how it would look better?

apoorvam added a commit that referenced this issue Dec 19, 2016
If specs are filtered by criteria like tags, the filtered specs are
listed before execution. This is ONLY in DEBUG mode for additional
details.
@sswaroopgupta
Copy link
Contributor

@kbangur : Apart from seeing it on console, there is another option to see the specifications getting filtered based on tags. Spectacle, can be used for static analysis(without having to run the specs).

@ocary
Copy link

ocary commented Apr 26, 2017

@kbangur and @apoorvam - regarding the request for having a pass/fail note in the console after each spec when multiple specs are being run: My Gauge automation suite runs are through TeamCity (no color in the build logs) and runs typically have a couple hundred specs and take a while to run to completion. Therefore, being able to easily see in the in-process run what was passing and failing was a really nice thing to have.

A solution we came up with - that has worked really well for us - was to add a log message to ScenarioExecutionHooks -> AfterSpec that prints out a pass/fail message. (Note that 'skipped' hasn't been taken into consideration here.) Copy/Pasting the console output - in our case this is in the TeamCity build log - into a text editor, from an in-progress run and finding failing specs, getting a general idea of pass/fail rates, etc is quick and easy.

@AfterSpec
    public void AfterGaugeSpec(ExecutionContext context) {
        if (context.getCurrentSpecification().getIsFailing()) {
            System.out.println("Spec complete - Failed : " + context.getCurrentSpecification().getName());
        } else {
            System.out.println("Spec complete - Passed : " + context.getCurrentSpecification().getName());
        }
}

@kbangur
Copy link
Author

kbangur commented Apr 27, 2017

That works like charm @ocary . Thank you for sharing such a simple solution :) I was just hoping this as a build in Gauge feature rather than handling it in an explicit way. Things get really difficult to read on the console with high number of executions in a single build and the Console never telling you where the execution reached!

Thanks once again :)

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

No branches or pull requests

5 participants