cucumber / common Goto Github PK
View Code? Open in Web Editor NEWA home for issues that are common to multiple cucumber repositories
Home Page: https://cucumber.io/docs
License: MIT License
A home for issues that are common to multiple cucumber repositories
Home Page: https://cucumber.io/docs
License: MIT License
Hello, I observe the following behavior.
= regular cucumber vs SIGINT
= cucumber with Signal.trap('SIGINT') { exit(false) }
I think that the latter behavior makes much more sense. If user wants to interrupt, then ideally that will happen as soon as possible while After hook is executed to clean-up any underlying test environment. This is current behavior for SIGTERM.
So I was wondering what was the idea behind default SIGINT trap behavior. Why not keep same as SIGTERM? Not a big issue for me as I have a workaround. But would be nice to make behavior more convenient OOB for other users.
btw very nice cucumber takes care to run After
hook on SIGTERM. I made some effort to put clean-up in at_exit
when After
is skipped but it seems After
is never skipped. Or was the idea to have single Ctrl+C terminate after scenario finish, second Ctrl+C to drop into After
hook? In such case it is not working like that.
I was wondering if the cucumber-cpp implementation was still maintained? There is PR in progress and the travis build is broken.
The wiki page titled "A Whole New World" is poorly named; the page describes how to configure the execution context of Cucumber scenarios but the title suggests it is introducing the "what and why" of Cucumber. It took me two hours of searching to find that page. I suggest renaming it to something like "Configuring the scenario execution context (World)"
Is it possible to add dagger support to cucumber framework?
In Spring Boot the recommended way to fire up a test container to run your tests against isn't the @ContextConfiguration annotation but the @SpringBootTest annotation. The Cucumber Spring support doesn't currently check for this annotation so you have to add @ContextConfiguration as well as @SpringBootTest in order for Cucumber to initiate the bootstrapping of the Spring container.
When running cucumber tests against a Spring app, the @SpringBootTest annotation should be sufficient on a Spring test container class in order to bootstrap the container.
Container only boostraps if you also add @ContextConfiguration in addition to @SpringBootTest
Change cucumber.runtime.java.spring.SpringFactory method annotatedWithSupportedSpringRootTestAnnotations to check for SpringBootTest annotation as well as others. NB this annotation not necessarily be in the classpath if you aren't using Spring Boot
Simplification of test code, using the recommended Spring Boot way of bootstrapping a test container.
Cucumber does not offer a parallelization option out of the box.
I'd like to get a Runtime option like "--threads 4".
The option will put all scenarios of all .features files in a queue.
As soon as a thread is idle, the thread will pick a scenario from the queue and execute it.
I'd also like to have a tagging mechanism to forbid some scenarios to run in parallel if they are prone to interfere with each other.
Maven plugins or other external components tend to offer hacky ways to implement some sort of parallelism.
They almost all span multiple Cucumber processes, each one running a different .feature file, and then they run a process that merges all the JSON reports into one big report.json.
I'm not happy with this situation because I (anybody can) have .feature files that vary in number, length, and duration of scenarios (depending on varying things like network load required by each scenario).
This results in having one thread taking very long to execute a bigger .feature file while other threads have finished executing all other small .feature files.
Given the current behavior, I'd like the parallelism to be smarter, to be optimal about execution time, and a better thread occupation efficiency.
For our project, I've made a quick fork of Cucumber with this feature, and we use it with success:
https://github.com/slaout/cucumber-jvm/tree/parallel-scenarios-execution-1.2.4
It has the following additions:
The fork is launching multiple theads: each scenario has its own Formatter and Reporter: executing a scenario will "print" to those formater and reporter: hey will just record method calls in memory.
At the end, I list all scenarios in the order they are declarer and I tell the formater and reporter of these scenarios to replay what they memorized into the "real" formatter and reporter to construct the report.json exactly the same as it would have been created without parallelism.
To not change the code too much, I heavily added ThreadLocal variables and a few synchronized blocks where needed.
A proper refactor of all the code base will be needed for it to be cleaner, but I read somewhere you were already planning to do so for the next major version of Cucumber.
It's developed mainly for the Java backend, but I think it would need basic adjustments to expose the new threads option to other languages.
It's done for the CLI runner.
It should work for the JUnit runner too, but because all reports are stored in memory and merged at the very end, the JUnit view of the IDE will not move in real time, and it will change all at once at the end.
Note: this fork also contains the @ContinueNextStepsFor({Throwable.class}) evolution seen on issue #79.
Because our project needs both parallel execution and continuing execution on Then step failures.
You can see the changes introduced by the fork with this comparison:
slaout/cucumber-jvm@continue-next-steps-for-exceptions-1.2.4...slaout:parallel-scenarios-execution-1.2.4
Mainly:
I don't see any real difference between pending steps and undefined steps. For both, the step hasn't been implemented.
Consider this step:
Given I fly the route between LHR and CDG
I want a Route
value object that's composed of those two. I can see how I fly the route between {origin:airport} and {destination:airport}
would work, but I want my step to receive a Route VO composed of two Airport VOs
(Example in Ruby):
@transform_lookup.add_transform(Transform.new(
'route',
Route,
'([A-Z]{3}).*([A-Z]{3})',
lambda { |from, to| Route.new(Airport.new(from), Airport.new(to)) }
))
Hello, right now I see that cucumber does:
I am trying to understand why that has been chosen. To me it makes more sense to do it the other way around. i.e. first transform and then match the steps.
In our test suite we decided to make <%= ... %>
expressions expand to some ruby expression inside. Issue is that if step for example matches \w+
then using such expression in place doesn't work. It is not such a big deal as quotes can be used for parameters. Just a little harder to write the quotes.
But I thought to propose making transformation happen before matching unless there are good reasons to keep current approach.
Thank you.
Is there a way to comment multiple lines not by each line start with a #
such as
/*
line1
lin2
....
*/
I just recently started running into an issue with the Rake tasks. It seems that the options that I'm trying to pass to cucumber are getting skipped and passed to the ruby as another command (or something) which leads to:
.rbenv/versions/2.3.0/bin/ruby -S bundle exec cucumber --profile default
Using the default profile...
0 scenarios
0 steps
0m0.000s
invalid option: --profile
For this test run, I've added --name nomatch
so it actually doesn't try to run any scenarios (just to highlight the issue).
I dug into the source a bit and it seems like in here:
https://github.com/cucumber/cucumber-ruby/blob/master/lib/cucumber/rake/task.rb#L81
where the cmd is built, in the use bundler
path, it builds a shell command like
.rbenv/versions/2.3.0/bin/ruby -S bundle exec cucumber --profile default
and (at least on my mac) the --profile
argument appears to apply to the ruby
command (not cucumber). I'm not sure where the quoting should go and will try to take a closer look. But if there is a known solution/workaround here, please let me know. I'm on cucumber (2.3.2)
Thanks
@aslakhellesoy @jbpros @mattwynne
This is a rework of the progress formatter output that I am thinking about for cucumber-js and wanted to bring up to the whole cucumber community. Please tag anyone else you think should see this
Given a feature:
Feature: A feature
Scenario: 1
Given a passing step
Scenario: 2
Given a passing step
And a failing step
And a skipped step
Scenario: 3
Given a passing step
And a ambiguous step
And a skipped step
Scenario: 4
Given a passing step
And a undefined step
And a skipped step
Scenario: 5
Given a passing step
And a pending step
And a skipped step
The current progress formatter output is
..F-.A-.U-.P-
(::) failed steps (::)
Error: error
at World.<anonymous> (/.../features/step_definitions/steps.js:5:11)
Failing scenarios:
features/a.feature:6 # Scenario: 2
5 scenarios (1 failed, 1 undefined, 1 ambiguous, 1 pending, 1 passed)
13 steps (1 failed, 1 undefined, 1 ambiguous, 1 pending, 4 skipped, 5 passed)
0m00.003s
You can implement step definitions for undefined steps with these snippets:
this.Given(/^a undefined step$/, function (callback) {
// Write code here that turns the phrase above into concrete actions
callback.pending();
});
The following steps have multiple matching definitions:
"a ambiguous step" matches:
/^an? ambiguous step$/ # features/step_definitions/steps.js:8
/^a ambiguous step$/ # features/step_definitions/steps.js:9
The fact that failed steps only lists the errors without the context (the scenario and step) has always bugged me and almost always made me rerun with pretty formatter the failing test in order to understand the context. I also dislike the that the different issues are shown in different places.
I propose the following new output
..F-.A-.U-.P-
Issues:
1) Scenario: 2 # features/a.feature:6
Given a failing step # features/step_definitions/steps.js:4
Error: error
at World.<anonymous> (/.../features/step_definitions/steps.js:5:11)
2) Scenario: 3 # features/a.feature:11
Given a ambiguous step
Multiple step definitions match:
/^an? ambiguous step$/ # features/step_definitions/steps.js:8
/^a ambiguous step$/ # features/step_definitions/steps.js:9
3) Scenario: 4 # features/a.feature:16
Given a undefined step
Use the following snippet to implement this step
this.Given(/a undefined step/, function(){
// Write code to here to turn the step into concrete actions
callback.pending();
})
4) Scenario: 5 # features/a.feature:21
Given a pending step # features/step_definitions/steps.js:11
Pending
5 scenarios (1 failed, 1 undefined, 1 ambiguous, 1 pending, 1 passed)
13 steps (1 failed, 1 undefined, 1 ambiguous, 1 pending, 4 skipped, 5 passed)
0m00.003s
Thoughts?
My application has many modules. So I want to orgnize my features by module in subdirectory. But, there is a problem has been harassing me:
how to execute the featues in my prefered order? Should I rename my features file in order? However, mayber I just want to execute some modules' features. I may have many different prefered order.
Maybe, someone suggests to execute featutre like this:
"cucumber -r features 1.feature 2.feature..."
That's good if my features are not too many. When I have a large number features to execute, it's to inconvenient. Anybody has better suggestion?
There's a page listed called "Gherkin)" that doesn't seem to have useful information. Does it need to be deleted? Updated? Something else?
Is it possible to use gherkin to write actual programs instead of just tests?
On PyPI (Python’s package index), there are some packages that mention Cucumber or Gherkin, but they all seem to be…
Is there no official Python implementation of Cucumber?
If not, I’d like to take a crack at writing one. I’m not a brilliant programmer, but I think I could write a working implementation that uses the JSON output from the existing Python implementation of cucumber/gherkin3.
If I do,
( This is just a spur-of-the-moment thought I had. Request For Comments! ;) )
I like how cucumber/gherkin3 is organized: each implementation has its own repository, but the parent repository is where all the collaboration happens. This allows for some flexibility between the different Gherkin 3 implementations, but uses the centralization of the parent repository to prevent any significant divergence (including some that were proposed by me :P).
I think it also promotes cross-pollination between people who arrive from different implementations. When a user asks “Why X?” or “Why not Y?”, it’s easy to say “Because of the big picture Z”. (It’s much easier than saying “Go see «other repository»/«other issue»”. And from the user side of the fence, it also “feels” easier to receive this answer and see an issue from the _same) repository; the other implementations are right there in the parent repository, too, which is also nice.)
cucumber-tests
” project?cucumber-tests
project would contain features, but no step definitionscucumber-tests
I was browsing some of the features for the different cucumber implementations (in response to your good feedback on #8) when this occurred to me.
What do you think?
I'm new to Cucumber, so pardon me if this is a stupid question.
At https://github.com/cucumber/cucumber/wiki/Gherkin#gherkin-syntax, I see
When you run the feature the trailing portion (after the keyword) of each step is matched to a Ruby code block called Step Definitions.
I'm trying to understand this better. This is my first exposure to Gherkin, from the link at https://github.com/cucumber/cucumber-js#features.
A recent discussion in the cucumber/gherkin gitter room revealed that there are (at least) 3 Cucumber linters out there:
The projects are similar, and I think there are some great unique things in each one of them.
What do you think about joining forces to create a single one to rule them all? Ideally in JavaScript since it's easier to use on the web, and also relatively easy to embed into other libraries as well as editors and IDEs.
If you're interested, just reply here and fill out this doodle for a google hangout kickoff meeting.
/cc @enkessler @allustin @vsiakka @r-cochran
Using version 1.2.4 JVM in junit with either java/scala
Consider this piece of Gherkin.
When I POST a request to /some/url with:
| header | value |
| SomeHeader | value |
| AnotherHeader | value2 |
| Content-Type | application/json |
"""
{
"member": "value",
"member": "value2"
}
"""
And this step method in scala (the same thing happens in java)
When(s"^I POST a request to ([^ ]*) with:") { (url: String, body: String, headers: DataTable) =>
println( headers )
println( url )
println( body )
}
the error is:
cucumber.runtime.CucumberException: Arity mismatch: Step Definition 'Quote.scala:13' with pattern [^I POST a request to ([^ ]*) with:] is declared with 3 parameters. However, the gherkin step has 3 arguments [/v4/quote/create, DocString:{
"till": "GB:a_store_id:a_till_id",
"currency": "GBP"
}, Table:[[header, value], [TraceId, a_trace_id], [ClientId, a_client_id:a_secret], [Authorization, Bearer:temporary_token], [Content-Type, application/json]]].
Step: When I POST a request to /v4/quote/create with:
at cucumber.runtime.StepDefinitionMatch.arityMismatch(StepDefinitionMatch.java:102)
at cucumber.runtime.StepDefinitionMatch.transformedArgs(StepDefinitionMatch.java:60)
at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
at cucumber.runtime.Runtime.runStep(Runtime.java:299)
at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:91)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
Two issues arise
Looking at the code it seems to be either of these two lines:
if (step.getRows() != null) {
argumentCount++;
} else if (step.getDocString() != null) {
argumentCount++;
}
if the gherkin is correct then this should be a if and then another if not if/else. The parameters might need fixing later on to get the correct items in place.
Hi there,
I'm trying to get a cucumber package together for GNU Guix. Running the tests which come as part of the 2.4.0 gem after gem unpack
gave one failure. Is this expected?
ben@u /tmp/cu/cucumber/psb1blr29rlnsbac8qw7i14lrpq9fyb9-cucumber-2.4.0 [env]# rake spec
fatal: Not a git repository (or any parent up to mount point /tmp/cu/cucumber/psb1blr29rlnsbac8qw7i14lrpq9fyb9-cucumber-2.4.0)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /tmp/cu/cucumber/psb1blr29rlnsbac8qw7i14lrpq9fyb9-cucumber-2.4.0)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /tmp/cu/cucumber/psb1blr29rlnsbac8qw7i14lrpq9fyb9-cucumber-2.4.0)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
/gnu/store/dlagr9ndsgip487j446m8a9hlpd1hbiq-ruby-2.3.1/bin/ruby -I/gnu/store/xg7i10rh7la1xszbr0dx7cgdns78i6c7-profile/lib/ruby/gems/2.3.0/gems/rspec-support-3.5.0/lib:/gnu/store/xg7i10rh7la1xszbr0dx7cgdns78i6c7-profile/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.1/lib /gnu/store/xg7i10rh7la1xszbr0dx7cgdns78i6c7-profile/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
/gnu/store/xg7i10rh7la1xszbr0dx7cgdns78i6c7-profile/lib/ruby/gems/2.3.0/gems/gherkin3-3.1.1/lib/gherkin3/dialect.rb:4: warning: already initialized constant Gherkin3::DIALECT_FILE_PATH
/gnu/store/h5077m4liqsnb8h97pm2mcw208z8jqrq-ruby-gherkin3-3.1.1/lib/ruby/gems/2.3.0/gems/gherkin3-3.1.1/lib/gherkin3/dialect.rb:4: warning: previous definition of DIALECT_FILE_PATH was here
/gnu/store/xg7i10rh7la1xszbr0dx7cgdns78i6c7-profile/lib/ruby/gems/2.3.0/gems/gherkin3-3.1.1/lib/gherkin3/dialect.rb:5: warning: already initialized constant Gherkin3::DIALECTS
/gnu/store/h5077m4liqsnb8h97pm2mcw208z8jqrq-ruby-gherkin3-3.1.1/lib/ruby/gems/2.3.0/gems/gherkin3-3.1.1/lib/gherkin3/dialect.rb:5: warning: previous definition of DIALECTS was here
................................................................................................................................................................................................F.................................................................................................................................................................................................................................................................................................................................................................................................
Failures:
1) Cucumber::Formatter::Html when writing the report to a file with a step that embeds a snapshot converts the snapshot path to a relative path
Failure/Error: expect(@out).to receive(:respond_to?).with(:path).and_return(true)
(#<StringIO:0x005572e56e9d00>).respond_to?(:path)
expected: 1 time with arguments: (:path)
received: 3 times with arguments: (:path)
# ./spec/cucumber/formatter/html_spec.rb:35:in `block (3 levels) in <module:Formatter>'
Finished in 1.59 seconds (files took 0.55264 seconds to load)
578 examples, 1 failure
I'm in a Guix environment with Ruby 2.3.1p112.
ben@u /tmp/cu/cucumber/psb1blr29rlnsbac8qw7i14lrpq9fyb9-cucumber-2.4.0 [env]# gem list
*** LOCAL GEMS ***
aruba (0.14.1)
bigdecimal (1.2.8)
builder (3.2.2)
bundler (1.12.5)
childprocess (0.5.8)
coderay (1.1.0)
contracts (0.12.0)
cucumber (2.4.0)
cucumber-core (1.5.0)
cucumber-wire (0.0.1)
did_you_mean (1.0.0)
diff-lcs (1.2.5)
event-bus (0.2.1)
ffi (1.9.14)
gherkin (4.0.0)
gherkin3 (3.1.1)
io-console (0.4.5)
json (1.8.3)
method_source (0.8.2)
mini_portile2 (2.1.0)
minitest (5.8.3)
multi_json (1.11.2)
multi_test (0.1.2)
net-telnet (0.1.1)
nokogiri (1.6.8)
pkg-config (1.1.7)
power_assert (0.2.6)
pry (0.10.1)
psych (2.0.17)
rake (10.4.2)
rdoc (4.2.1)
rspec (3.5.0)
rspec-core (3.5.1)
rspec-expectations (3.5.0)
rspec-mocks (3.5.0)
rspec-support (3.5.0)
slop (3.6.0)
test-unit (3.1.5)
thor (0.19.1)
I do not have the git checkout of v1.x-bugfix branch of http://github.com/cucumber/cucumber-ruby-core.git
as specified in the Gemfile, but it doesn't seem on first glance to be related to the bug cucumber/cucumber-ruby-core#109
Thanks in advance. ben.
At #cukenhagen @mattwynne suggested we write a test suite that will validate that a cucumber emits the expected events when executing features.
In Cucumber 1, I was able to obtain the gherkin of a scenario in the After block with something like this:
After do |scenario|
scenario.steps.map(&:to_sexp).map{|a| a[-2..-1].join}
...
end
this was used to make annotated gifs of each test, step by step.
In Cucumber 2, I'm not observing that you can get the steps from a scenario. I ran across a mailing list thread addressing a related issue about getting the result from a scenario.
Could either the scenario in the After block, or the step in the AfterStep block, be updated to provide the gherkin in Cucumber 2?
How can i get cucumber result in a file?
This is not currently available on NPM
I have personally always use --strict
and don't see why its needed. What is the reasoning behind undefined/pending steps exiting with status zero?
Wouldn't it be nice if Cucumber could suggest step definitions from the current project's glue that are similar to the undefined step that is currently being matched.
There are fuzzy regex matching libraries available e.g. http://laurikari.net/tre/
When a step fails to match an undefined error is thrown and a snippet emitted. Often the failure is due to simple mistyping by the user. It would be nice if Cucumber could suggest step definitions that almost matched.
This could make it much simpler to pick up many categories of error, such as missing spaces and/or misspelt words
Say I need to use Japanese as the primary language for my feature files. Do I need to actually put
# language: ja
at top of each file? That's not really smart to do to be honest.
Can't find a cli option that specifies a spoken language when running tests, and the reference doesn't say anything about this.
Something like this:
Regarding this: cucumber/cucumber-js#267
Do we have anything similar in cucumber?
marcfallows commented on Oct 23, 2014
Hello,I would expect to be able to have my scenario outline title have more information by using the examples >within the title itself:
Scenario Outline: A <some> step is <result> When a <some> step Then I get <result> Examples: | some | result | | passing | passed | | failing | skipped |
Then my scenario titles end up very useful:
Scenario: A passing step is passed Scenario: A failing step is skipped
This doesn't seem to be working for me. Is this a supported feature? If not, is it something that I could >assist in having included? Or, is it not expected to work like this?
If not, it would be very useful to have something like this. It would increase the readability of reports with alot of example data.
Implement TagExpressions for Ruby.
(Integrating Tag Expressions into Cucumber will be tracked in a separate ticket)
I'm using Cucumber 2.3.3
I want to print some log after each step so I have my code like this:
AfterStep do
print_log_for_step(@current_step)
end
But in case the step is failed, it never goes to AfterStep, it move to After scenario so I cannot print log of the failed step.
Right now I have to work around in this case.
Anybody has same problem to me?
Is that possible I output the cucumber pretty and json format at the same time by only running the test feature once? Or is that a way I can output the pretty format (e.g. to terminal) and then transfer it to json format?
After update of cucumber gem, I'm getting this error while starting my tests.
cucumber 2.0.2
cannot load such file -- cucumber/formatter/ordered_xml_markup (LoadError)
I have a task to run the cucumber test cases or features in application server. I tried to research about it and i didn't find any solution. And my application is in spring MVC.
Can any one help me?
Add the possibility to being able to mark some "Then" step-definitions so that when they fail, they still mark the result as failed, but continue executing the next steps of the scenario.
Sometimes, you have such Cucumber scenario:
When I do some extensive computation like loading a heavy web page
Then I check thing 1
And I check thing 2
And I check thing 3
And So on
In this particular situation:
The step-definitions developer should be able to tell that one particular step is an assertion that have no impact on the following steps of the scenario it's used in.
He/she could then add an annotation on that step-definition to allow Cucumber to continue the next steps executions if that one fails.
See the discussion on Google Groups.
I've made this Cucumber fork for our own needs:
github.com/slaout/cucumber-jvm
Please read the README.md for an explanation and our return of experience on this subject.
It's only working on the Java backend.
See the discussion on Google Groups for people proposing to port it to Ruby, for instance.
Please tell me if the fork is a good starting point for you and you would like me to transform this fork into a Pull Request.
I have a program running CLI runner to execute the cucumber tests. How do I convert the program so that it uses RunCukesTest to run Cucumber instead?
The link to the "plain language" is broken (404) and points to https://github.com/cucumber/cucumber/blob/master/gherkin.md
Hi
We have "Cucumber Reports Plugin" version 0.0.23 (pretty old) , and we upgraded our jenkins to 1.652 , after upgrading we are seeing that the cucumber results are not displaying the circle form,
It is saying that "This content requires JavaScript."
Due to some reasons Our QA team is not ready to upgrade the Cucumber Reports Plugin.
Can you please suggest how to fix this issue ??
screen shot attached
I want to develop a test tool for my project! Can I create a scenario creation loop in feature file?
When generating step snippets, I would like the generated expression to expose the argument names, so the function arguments in the snippet use the same name.
Current test
it("documents expression generation", () => {
const transformLookup = new TransformLookup()
/// [generate-expression]
const generator = new CucumberExpressionGenerator(transformLookup)
const undefinedStepText = "I have 2 cucumbers and 1.5 tomato"
const generatedExpression = generator.generateExpression(undefinedStepText, true)
assert.equal(generatedExpression.source, "I have {arg1:int} cucumbers and {arg2:float} tomato")
assert.equal(generatedExpression.transforms[1].typeName, 'float')
/// [generate-expression]
})
Proposed addition to the test
assert.deepEqual(generatedExpression.argumentNames, ['arg1', 'arg2'])
Is this by intent or planed to link to a description/site what BDD is?
some string with �? symbol
йцукенгшщзхъфывапролджэячсмитьбю.ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМ�?ТЬБЮ,
Seems like a bug...
ruby -v
ruby 2.0.0p643 (2015-02-25) [i386-mingw32]
cucumber --version
2.0.2
64bit operating system, windows 7
cucumber-expressions is written in ES6 which isn't as supported in earlier versions of node. I'm fine dropping support for node 0.10 and node 0.12 whose long term support ends at the end of October and December of this year, but definitely want to continue supporting node 4.
Hitting the following on travis CI for node 4:
/home/travis/build/cucumber/cucumber-js/node_modules/cucumber-expressions/lib/cucumber_expression.js:3
class CucumberExpression {
^^^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
I hope we just need to add 'use strict';
to the top of the files and that's it. I'll try that out
Feature: Contact Us Page
As an end user
I want a contact us page
So that I can find out more about QAWorks exciting services!!
Scenario: Valid Submission
Given I am on the "QAWorks" on "Chrome"
When I click on "Contacttab"
And I enter "" with "namelocate"
And I enter "" with "emailocate"
And I enter "" with "messagelocate"
And I click on the "SendButton"
Then I should be able to contact QAWorks with the following information
| name | email | message |
|j.Bloggs | [email protected] | please contact me I want to find out more |
1)It should open contact us page
2)It should able to send name,email,message to the text box
3)Click on send button and the data should get sent to qaworks.
Bug:
It is not able to send the data to name,email,message field.Instead of capturing data it is sending it as in the text box.
Function written for the featurefile
The following funtion doesnot work.
@and("^I enter "([a-zA-Z]{1,})" with "([^\"]*)"$")
public void I_enter_name(String text,String object){
system.out.println("I Click On "+ object);
selenium.type(text, object);
}
Locators for name,email,message respectively):
namelocate=//input[@id='ctl00_MainContent_NameBox']
emailocate=//input[@id='ctl00_MainContent_EmailBox']
messagelocate= //*[@id='ctl00_MainContent_MessageBox']
Utility functions:
locator has passed to objectname
,, has sent to Text in the following function.
public void type(String Text, String objectName)
{
driver.findElement(By.xpath(OR.getProperty(objectName))).sendKeys(Text);
}
Possible solution:
change the regular expression to accept the paratemeter in step definition.
Regular expressions in step definitions should always be part of Cucumber, but we should provide a simpler alternative for those who wish. Good Gherkin shouldn't require the complexities of RegExp anyway - if it does it's usually a sign the Gherkin is too complicated.
There are already several alternative pattern syntaxes out there, which has been discussed in this thread.
There are also some interesting alternatives on this c2 page and this HN thread.
Some things to consider:
The new syntax must be implemented on the following platforms before we can close this issue
We need a spec.
It's been talked about a lot among different people at different times. The spec should contain:
Inspiration:
This will make it easier to use the validator in the build of various event producers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.