-
Notifications
You must be signed in to change notification settings - Fork 338
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
FEATURE REQUEST:Ability to Parse spec files #748
Comments
I see the PR for this has been merged, and this is now closed. Is this implemented with the next release? |
@brywiser - this is WIP, it got auto-closed because of this commit message:
This still needs to be tested by @sguptatw. Watch out for updates. Thanks for pointing us to this! |
This validation occurs in the execution cycle. In case of parallel execution multiple specs/scenarios/steps are executing together. How will this work in parallel runs? |
@sguptatw Is this question directed at me or the developers? If so, I am unsure how to answer it to be honest, when I suggested the feature, I didn't think about how it would be handled in parallel execution. Perhaps @sriv or @Apoorva-GA may have some insight into that. Thanks! |
Should be available in nightly >= 14/8/17 |
@brywiser - regarding the feature we implemented. If you have a unimplemented step in your spec/concept file. When you run The feature is available in the latest nightly. Please install the nightly to try out this feature and let us know your feedback. |
@brywiser - @sguptatw 's question is addressed to the dev team. @sguptatw - you are right, validation is a |
related issue: #772 |
@sriv and @Apoorva-GA So I made a sample spec file, with no matching steps implemented. It generates the validation error that the steps are not found, but thats all I see. I dont see a generic step implementation that I can use. See output here: `CHI-BBROUDE-MAC:cobalt_gauge bbrouder$ gauge validate Pluginscsharp (0.10.1) |
I dont see a nightly release for Aug 14, but that could something with timezones perhaps? So i have the 8/15 nightly install. |
Also just tried uninstall the different language plugins to see if that made a difference, same output as before: `CHI-BBROUDE-MAC:cobalt_gauge bbrouder$ gauge version Pluginsflash (0.0.1) |
@brywiser - Please try it with gauge-java nightly installed. This feature requires changes to gauge as well as language runners. Currently the change is applied only to gauge-java (rest will follow). Thanks for checking this out. |
Hey @sriv I downloaded and unzipped the file from the link u put above, is there instructions on where to install this to? Or where to save the zip file? |
@sriv I figured it out and confirmed it worked. But id like to do some more testing, but right off the bat, looks good! |
Hey @sriv Looks good! However, I cannot speak for Java, and I am unsure how it might get handled in python, but should the generic function name have somewhat unique title? At least in my experience, we cut and paste these and put whatever necessary test code in the step, but the names have never been the same. See screenshot below: |
@brywiser Thanks for the feedback. I have made changes for the generic function to have unique name. Also have a look at #772 where validation errors and suggestions are being separated. Output of validation looks something like this :
|
What is the expected behavior if the unimplemented step appears in multiple specs. Actual: |
@Apoorva-GA thanks for the change. Is this deployed so I can update and test it out myself? |
Limiting the method names to 3 words from step text. Should be available in gauge-java nightly > 31/08/17 |
throw a notImplemented Exception - so that the suggested methods do not pass by default |
As discussed, method names will have all words from step text except parameters. Also throwing Fix should be available in gauge-java nightly > 01-09-17 |
Other languages should throw equivalent errors/exceptions. |
@sriv and @Apoorva-GA I dont know if this is still WIP? or should be closed. So I did some testing with the java nightly release that @Apoorva-GA mentions above. Found an issue, If you have multiple steps that are just an argument, you only get the first one it finds. Not all of them. See below:
|
@brywiser If you have multiple steps that are just an argument, then the steps are same. so the suggestion is shown only once. |
Thank you everyone for working through this! @Apoorva-GA It looks good. I am assuming it is now available for java? Then will be rolled out to other languages soon? |
@brywiser ideally we'll try to see if users are finding this useful. This has to be implemented in the respective language runners. |
It looks like @kashishm has added this in gauge-python. |
Thank you @kashishm! And @zabil I am actually very interested in becoming a contributor, I do have another feature that I want to add, and since I am getting my team onto gauge, me being more involved would be good. I am going to start a class in Golang, which I have never used before(that is what gauge is written in?) |
@nehashri |
@brywiser That should be a good start. If you have any queries, please do reach out to us. |
@brywiser This feature is available in Gauge Python 0.2.2. To update, run the following commands.
|
Thanks @kashishm! I just upgraded, looking forward to using this, my team will also be excited to as we are switching all our tests over now :) |
@brywiser it's better to go through it and touch only parts required by a feature that you'd like to implement. |
@zabil Sure! Im excited to see what more awesome features we can introduce into gauge. |
Hello! I am looking into switching my team over to gauge for our test runner from Lettuce(lettuce.it). Most of our test frameworks are written in Python, except for 1 in Java. One feature that our current test runner has, that I don't see in Gauge, is the ability to parse the test case file, and spit out some generic step implementations. So my request is for that ability.
###Requirements
###Stretch Goals/Nice to haves
###Example(with stretch goals)
"from getgauge.python import step
*************************************
GAUGE PARSER TEST
*************************************
@step('Given I am testing the gauge parser')
def given_i_am_testing_the_gauge_parser():
assert False, "You must implement this"
@step('When I pass a into gauge')
def when_i_pass_a_file_into_gauge(file):
assert False, "You must implement this"
@step('Then I see my boilerplate step implementations')
def then_i_see_my_boilerplate_step_implementations():
assert False, "You must implement this"
Gauge version
CHI-BBROUDE-MAC:~ bbrouder$ gauge -v
[DEPRECATED] This usage will be removed soon. Run
gauge help --legacy
for more info.Gauge version: 0.9.0
Plugins
csharp (0.10.1)
html-report (4.0.1)
java (0.6.4)
python (0.2.0)
ruby (0.4.1)
spectacle (0.1.2)
xml-report (0.2.0)
Thank you! Please let me know if anything is unclear.
The text was updated successfully, but these errors were encountered: