View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2008 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.soapui.model.testsuite;
14  
15  import java.util.List;
16  
17  import com.eviware.soapui.model.TestModelItem;
18  import com.eviware.soapui.support.types.StringToObjectMap;
19  
20  /***
21   * A TestCase holding a number of TestSteps
22   * 
23   * @author Ole.Matzura
24   */
25  
26  public interface TestCase extends TestModelItem, ResultContainer
27  {
28     public final static String STATUS_PROPERTY = TestCase.class.getName() + "@status";
29     public final static String DISABLED_PROPERTY = TestCase.class.getName() + "@disabled";
30     
31     public TestSuite getTestSuite();
32     
33     public TestStep getTestStepAt( int index );
34     
35     public int getIndexOfTestStep( TestStep testStep );
36     
37     public int getTestStepCount();
38     
39     public List<TestStep> getTestStepList();
40  
41     public LoadTest getLoadTestAt( int index );
42     
43     public LoadTest getLoadTestByName( String loadTestName );
44     
45     public int getIndexOfLoadTest( LoadTest loadTest );
46     
47     public int getLoadTestCount();
48     
49     public List<LoadTest> getLoadTestList();
50     
51     public TestRunner run( StringToObjectMap contextProperties, boolean async );
52     
53     public void addTestRunListener( TestRunListener listener );
54     
55     public void removeTestRunListener( TestRunListener listener );
56  
57  	public int getTestStepIndexByName( String stepName );
58  	
59  	public TestStep findPreviousStepOfType( TestStep referenceStep, Class<? extends TestStep> stepClass );
60  	
61  	public TestStep findNextStepOfType( TestStep referenceStep, Class<? extends TestStep> stepClass );
62  	
63  	public <T extends TestStep> List<T> getTestStepsOfType( Class<T> stepType );
64  	
65  	public void moveTestStep( int index, int offset );
66  
67  	public TestStep getTestStepByName( String stepName );
68  	
69  	public boolean isDisabled();
70  	
71  	public String getLabel();
72  }