Dynamic parameter cannot be resolved in Gauge

104
January 31, 2018, at 10:54 PM

i try to use the file special parameter in a Gauge specification.

Export a customer
----------------------------------------
* Find customer "Hans"
* Export customer to <file:/customer.xml>

The java implementation for this looks like this

@Step("Export customer to <file>")
public void test(String file) {
   System.out.println("file " + file);
}

I assume the parameter typ is String (can it also be File ?)

But nevertheless, running this, returns

[ParseError] C:\Users\user\IdeaProjects\qmsgauge\specs\tenantManagement.spec:40 
 Dynamic parameter <file:/customer.xml> could not be resolved => 'Export customer to <file:/customers.xml>'
Successfully generated html-report to => C:\Users\user\IdeaProjects\qmsgauge\reports\html-report\index.html

How do I define the file parameter in the spec and how do need to write the java implementation for this ?

Thanks

READ ALSO
Cassandra connection timeout issue

Cassandra connection timeout issue

I am getting below error message while extracting data from Cassandra DB (from one of the table) using java code

186
Select Distinct * as query method?

Select Distinct * as query method?

In my Spring project, I'm currently using only query methods

192
access second element in java stream intermediate methods [on hold]

access second element in java stream intermediate methods [on hold]

I'm trying to figure out if possible to access the second element in java stream with an intermediate method such (filter, map

137
why the order in my HashSet never changes?

why the order in my HashSet never changes?

I'm using Strings (long sentences) with HashSet and I'm trying to shuffle them to get a random sentence every time the program runs but this is not happening

133