01: package org.jzonic.webtester.commands;
02:
03: import org.jzonic.webtester.WebTestContext;
04:
05: /**
06: * This interface defines all methods that a test command must implement.
07: *
08: * @author Mecky
09: */
10: public interface WebTestNode {
11:
12: /**
13: * This method is called from the WebTester to pass over the arguments.
14: * The argument is taken from every line right after the | which marks
15: * the separator between the command and the parameter. Every command
16: * is responsible for extracting the parameters it needs out of this
17: * String.
18: *
19: * @param value the String containing all parameters
20: */
21: public void setParameter(String value);
22:
23: /**
24: * This method is called during the run of the testcase. It will get the
25: * current WebTestContext passed over and must return a WebTestNodeResult.
26: * If this result is a failure then the entire test will stop and fail.
27: *
28: * @param context the WebTestContext
29: * @return WebTestNodeResult containing the current result of this WebTestNode
30: */
31: public WebTestNodeResult execute(WebTestContext context);
32:
33: /**
34: * Returns the name of the concrete command
35: *
36: * @return the name of the command
37: */
38: public String getName();
39: }
|