gstu...@learndirect.co.uk
unread,Mar 20, 2013, 5:26:40 AM3/20/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to subs...@googlegroups.com
Hello,
We are starting to ramp up our usage of Substeps as our test automation framework now.
We have come across a weakness with the current way parameters are substituted. If a REGEX is used in the Java Step Annotation, but a variable is used in the Substep Definition, the Eclipse plugin tries to match the variable placeholder <myVariable> with the REGEX, which of course it will rarely match anything but the most inclusive of REGEX expressions.
A simple example:
// Given this Java code:
@Step("GetUser username=\"(bob|bill)\"")
public void getUser(String username) {
// do nothing
}
// We should be able to use bob, or bill, or <username>
// However, when we use <username> the plugin complains because it does not match the REGEX in the Step.
Define: I try to get user "<username>"
GetUser username="bob"
GetUser username="bill"
# The Eclipse plugin complains about this:
GetUser username="<username>"
Note, using the code above, it appears the Junit runner was happy to compile and run the code, even though the Eclipse plugin thinks the last line is an error.
Is this something that can be fixed, please?
Many thanks,
Gary