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

Executing the previous run from command line #862

Closed
BugDiver opened this issue Nov 17, 2017 · 12 comments
Closed

Executing the previous run from command line #862

BugDiver opened this issue Nov 17, 2017 · 12 comments
Assignees

Comments

@BugDiver
Copy link
Member

User should be able to run the previous run from the command line.

Proposed behavior

  • Add a flag --repeat to run subcommand.
  • Execute the last run with same flags and env by running gauge run --repeat command.
riju91 added a commit that referenced this issue Nov 17, 2017
@haroon-sheikh
Copy link
Contributor

@BugDiver @riju91 What is the use case of this?

It sounds like a good feature only if we could pass the number of times to repeat. This can be really useful when trying to replicate a intermitted issue.

E.g. gauge run --repeat=3.

I guess the only problem will be reporting when running multiple times.

@sriv
Copy link
Member

sriv commented Nov 20, 2017

@haroon-sheikh - this issue is a pre-requisite for getgauge/gauge-vscode#41

TLDR: we are implementing a feature in vscode plugin that will allow users to author implementation, and repeat scenario run without having to toggle between files.

kashishm pushed a commit that referenced this issue Nov 20, 2017
@BugDiver
Copy link
Member Author

should be available in nightly >= 20-11-2017

@sswaroopgupta
Copy link
Contributor

sswaroopgupta commented Nov 20, 2017

Test cases

  • Should give an error message if there is no last run
  • Re-run for passed, failed, skipped tests
  • Re-run with the given environment
  • Re-run with tags, parallel run, data driven execution, selective data driven execution, folder execution

@sswaroopgupta
Copy link
Contributor

If gauge does not execute specs
example: -

  • No specifications found in specs. - for a tagged expression
  • Failed to load env. something1 environment does not exist - for a non existing env input

What should be the behavior of re-run in such scenarios

@zabil
Copy link
Member

zabil commented Nov 22, 2017

What should be the behavior of re-run in such scenarios

Show an info on the problems mentioned.

@sswaroopgupta
Copy link
Contributor

sswaroopgupta commented Nov 24, 2017

Expected behavior
Should show info when previous run has failed.

Actual behavior
Runs the previously successful gauge execution.

Steps to replicate
If gauge does not execute specs
example: -

  • No specifications found in specs. - for a tagged expression
  • Failed to load env. something1 environment does not exist - for a non existing env input
gauge run --env="something"
  • Run again. It runs previously successful execution

@BugDiver
Copy link
Member Author

Should be fixed in nightly >= 27-11-2017

@sswaroopgupta
Copy link
Contributor

Please find the failing test cases inline in the previous comment

@sswaroopgupta
Copy link
Contributor

sswaroopgupta commented Nov 28, 2017

If the previous command is gauge run --failed what should gauge run --repeat do when run multiple times? Should it run only the failed tests repeatedly?

@sriv
Copy link
Member

sriv commented Nov 28, 2017

If the previous command is gauge run --failed what should gauge run --repeat do when run multiple times? Should it run only the failed tests repeatedly?

IMO, gauge run --repeat should just repeat the last run. It should be synonymous with running the previous command again.

In this case this:

> gauge run --failed
> gauge run --repeat
> gauge run --repeat

should be equivalent to:

gauge run --failed
gauge run --failed
gauge run --failed

This would imply that any test that passes in the 2nd run will not be repeated in the 3rd.

riju91 added a commit that referenced this issue Dec 7, 2017
riju91 added a commit that referenced this issue Dec 7, 2017
riju91 added a commit that referenced this issue Dec 7, 2017
riju91 added a commit to getgauge/common that referenced this issue Dec 7, 2017
nehashri pushed a commit to getgauge/common that referenced this issue Dec 7, 2017
riju91 added a commit to getgauge/gauge-tests that referenced this issue Dec 8, 2017
For the repeat feature we store the last command in .gauge folder.
So gauge init will now have .gauge directory created
riju91 added a commit that referenced this issue Dec 8, 2017
riju91 added a commit that referenced this issue Dec 8, 2017
riju91 added a commit that referenced this issue Dec 11, 2017
riju91 added a commit that referenced this issue Dec 11, 2017
riju91 added a commit that referenced this issue Dec 11, 2017
riju91 added a commit that referenced this issue Dec 11, 2017
riju91 added a commit that referenced this issue Dec 11, 2017
riju91 added a commit that referenced this issue Dec 11, 2017
riju91 added a commit that referenced this issue Dec 11, 2017
@riju91
Copy link
Contributor

riju91 commented Dec 12, 2017

Should be available in nightly >= 12-12-2017

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

7 participants