01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18:
19: package org.apache.jmeter.testelement;
20:
21: import org.apache.jmeter.engine.event.LoopIterationEvent;
22:
23: /**
24: * TestListener interface is used for methods that are called at different
25: * stages of each test.
26: *
27: */
28: public interface TestListener {
29: /**
30: * Called just before the start of the test from the main engine thread.
31: *
32: * This is before the test elements are cloned.
33: *
34: * Note that not all the test
35: * variables will have been set up at this point.
36: *
37: * @see org.apache.jmeter.engine.StandardJMeterEngine#run()
38: *
39: */
40: public void testStarted();
41:
42: /**
43: * Called just before the start of the test from the main engine thread.
44: *
45: * This is before the test elements are cloned.
46: *
47: * Note that not all the test
48: * variables will have been set up at this point.
49: *
50: * @see org.apache.jmeter.engine.StandardJMeterEngine#run()
51: *
52: */
53: public void testStarted(String host);
54:
55: /**
56: * Called once for all threads after the end of a test.
57: *
58: * This will use the same element instances as at the start of the test.
59: *
60: * @see org.apache.jmeter.engine.StandardJMeterEngine#stopTest()
61: *
62: */
63: public void testEnded();
64:
65: /**
66: * Called once for all threads after the end of a test.
67: *
68: * This will use the same element instances as at the start of the test.
69: *
70: * @see org.apache.jmeter.engine.StandardJMeterEngine#stopTest()
71: *
72: */
73:
74: public void testEnded(String host);
75:
76: /**
77: * Each time through a Thread Group's test script, an iteration event is
78: * fired for each thread.
79: *
80: * This will be after the test elements have been cloned, so in general
81: * the instance will not be the same as the ones the start/end methods call.
82: *
83: * @param event
84: */
85: public void testIterationStart(LoopIterationEvent event);
86: }
|