@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/test/features",
glue = "ru.savkk.test",
tags = "@withdrawal",
snippets = SnippetType.CAMELCASE
)
public class RunnerTest {
}
:
Undefined scenarios:
test.feature:6 # :
test.feature:12 # : -
2 Scenarios (2 undefined)
6 Steps (6 undefined)
0m0,000s
You can implement missing steps with the snippets below:
@("^ (\\d+) $")
public void (int arg1) throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
@("^ (\\d+) $")
public void (int arg1) throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
@("^ \"([^\"]*)\"$")
public void (String arg1) throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
Cucumber .
MyStepdefs ru.savkk.test , :
import cucumber.api.PendingException;
import cucumber.api.java.ru.*;
public class MyStepdefs {
@("^ (\\d+) $")
public void (int arg1) throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
@("^ (\\d+) $")
public void (int arg1) throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
@("^ \"([^\"]*)\"$")
public void (String arg1) throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
}
Cucumber . , Java- glue , . , . , .
, Cucumber , , , :
@("^ (\\d+) $")
@("^ (\\d+) $")
.
, . , . (\\d+). , \"([^\"]*)\". .
, :
:
.
(
)
2
j
.*
0
( )
Abracadabra
789-160-87
,
.+
( )
,
,
.
.{2}
(
)
22
$
JJ
.{1,3}
(
)
!
^
^aaa aaa
^aaa aaabbb
^aaa bbbaaa
$
aaa$ aaa
aaa$ aaabbb
aaa$ bbbaaa
\d*
[0-9]*
( )
12321
5323
\d+
[0-9]+
,
,
.
\w*
,
( )
_we
_1ee
Gfd4
\s
,
\t, \r
\n
"[^\"]*"
( )
"aaa"
""
"3213dsa"
?
abc?
ab
abc, b bc
|
aaa|bbb
aaa
bbb, aaabbb
()
. Cucumber
.
(\d+) 10 ,
10
(?: )
.
Cucumber
.
(\d+) (?:|) 3
, 3 ,
- .
, . Cucumber :
, , ArrayList:
, ,
@("^ (.*)$")
public void (List arg) {
// -
}
, Delimiter:
@("^ (.+)$")
public void (@Delimiter(" ") List arg) {
// -
}
, , Cucumber ArrayList:
| |
| |
| |
@("^ $")
public void (List arg) {
// -
}
, , Cucumber , , :
| | true |
| | false |
| | true |
public void (Map arg) {
// -
}
:
DataTable
| | true | 5 |
| | false | 8 |
| | true | 2 |
@("^ $")
public void (DataTable arg) {
// -
}
DataTable , . . :
public List> asMaps(Class keyType,Class valueType)
public class Menu {
private String title;
private boolean isAvailable;
private int subMenuCount;
public String getTitle() {
return title;
}
public boolean getAvailable() {
return isAvailable;
}
public int getSubMenuCount() {
return subMenuCount;
}
}