• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java TestStep类的典型用法和代码示例

java 3次浏览

本文整理汇总了Java中com.eviware.soapui.model.testsuite.TestStep的典型用法代码示例。如果您正苦于以下问题:Java TestStep类的具体用法?Java TestStep怎么用?Java TestStep使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

TestStep类属于com.eviware.soapui.model.testsuite包,在下文中一共展示了TestStep类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getValueAt

点赞 3

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
    switch (Column.values()[columnIndex]){
        case Name :
            return data.get(rowIndex).name;
        case ServerUri:
            return data.get(rowIndex).params.getServerUri();
        case ClientId:
            return data.get(rowIndex).params.fixedId;
        case Login:
            return data.get(rowIndex).params.login;
        case Password:
            return data.get(rowIndex).params.password;
        case Used:
            Connection connection = data.get(rowIndex).originalConnection;
            if(connection == null) return false;
            List<TestStep> involvingTestSteps = usageData.get(connection);
            return involvingTestSteps != null && involvingTestSteps.size() > 0;
    }
    return null;
}
 

开发者ID:SmartBear,
项目名称:ready-mqtt-plugin,
代码行数:22,
代码来源:ConfigureProjectConnectionsDialog.java

示例2: getValueAt

点赞 3

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
    switch (Column.values()[columnIndex]) {
    case Name:
        return data.get(rowIndex).name;
    case ServerUri:
        return data.get(rowIndex).params.serverUri;
    case Subprotocols:
        return data.get(rowIndex).params.subprotocols;
    case Login:
        return data.get(rowIndex).params.login;
    case Password:
        return data.get(rowIndex).params.password;
    case Used:
        Connection connection = data.get(rowIndex).originalConnection;
        if (connection == null)
            return false;
        List<TestStep> involvingTestSteps = usageData.get(connection);
        return involvingTestSteps != null && !involvingTestSteps.isEmpty();
    default:
        return null;
    }
}
 

开发者ID:hschott,
项目名称:ready-websocket-plugin,
代码行数:24,
代码来源:ConfigureProjectConnectionsDialog.java

示例3: collectWsdlTestRequests

点赞 3

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
/**
 * Collect and filter by operation all the WsldTestrequest from the current project.
 */
private Map<String, WsdlTestRequest> collectWsdlTestRequests(Operation operation){
   Map<String, WsdlTestRequest> result = new HashMap<>();

   for (TestSuite testsuite : project.getTestSuiteList()){
      for (TestCase testcase : testsuite.getTestCaseList()){
         for (TestStep teststep : testcase.getTestStepList()){
            if (teststep instanceof WsdlTestRequestStep){
               WsdlTestRequestStep ws = (WsdlTestRequestStep)teststep;
               WsdlTestRequest wr = ws.getHttpRequest();
               if (wr.getOperationName().equals(operation.getName())){
                  result.put(wr.getName(), wr);
               }
            }
         }
      }
   }
   return result;
}
 

开发者ID:microcks,
项目名称:microcks,
代码行数:22,
代码来源:SoapUIProjectImporter.java

示例4: collectRestTestRequests

点赞 3

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
/**
 * Collect and filter by operation all the WsldTestrequest from the current project.
 */
private Map<String, RestTestRequest> collectRestTestRequests(Operation operation){
   Map<String, RestTestRequest> result = new HashMap<String, RestTestRequest>();

   for (TestSuite testsuite : project.getTestSuiteList()){
      for (TestCase testcase : testsuite.getTestCaseList()){
         for (TestStep teststep : testcase.getTestStepList()){
            if (teststep instanceof RestTestRequestStep){
               RestTestRequestStep rs = (RestTestRequestStep)teststep;
               RestTestRequest rr = rs.getTestRequest();
               if (rs.getResourcePath().equals(operation.getName())){
                  result.put(rr.getName(), rr);
               }
            }
         }
      }
   }
   return result;
}
 

开发者ID:microcks,
项目名称:microcks,
代码行数:22,
代码来源:SoapUIProjectImporter.java

示例5: formUsageData

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
private HashMap<Connection, List<TestStep>> formUsageData(){
    HashMap<Connection, List<TestStep>> usageData = new HashMap<>();
    List<? extends TestSuite> testSuites = connectionsTargetItem.getTestSuiteList();
    if(testSuites != null) {
        for (TestSuite testSuite : testSuites) {
            List<? extends TestCase> testCases = testSuite.getTestCaseList();
            if (testCases == null) continue;
            for (TestCase testCase : testCases) {
                List<TestStep> testSteps = testCase.getTestStepList();
                if (testSteps == null) continue;
                for (TestStep testStep : testSteps) {
                    if (testStep instanceof MqttConnectedTestStep) {
                        Connection testStepConnection = ((MqttConnectedTestStep) testStep).getConnection();
                        if (testStepConnection != null && !testStepConnection.isLegacy()) {
                            List<TestStep> usingItems = usageData.get(testStepConnection);
                            if (usingItems == null) {
                                usingItems = new ArrayList<>();
                                usageData.put(testStepConnection, usingItems);
                            }
                            usingItems.add(testStep);
                        }
                    }
                }
            }
        }
    }
    return usageData;
}
 

开发者ID:SmartBear,
项目名称:ready-mqtt-plugin,
代码行数:29,
代码来源:ConfigureProjectConnectionsDialog.java

示例6: getAffectedModelItems

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
private List<String> getAffectedModelItems(int[] rows, int maxRowCount){
    ArrayList<String> result = new ArrayList<>();
    List<? extends TestSuite> testSuites = connectionsTargetItem.getTestSuiteList();
    if(testSuites != null) {
        for (TestSuite testSuite: testSuites) {
            List<? extends TestCase> testCases = testSuite.getTestCaseList();
            if(testCases == null) continue;
            for (TestCase testCase : testCases){
                List<TestStep> testSteps = testCase.getTestStepList();
                if(testSteps == null) continue;
                for(TestStep testStep: testSteps){
                    if(testStep instanceof MqttConnectedTestStep){
                        Connection testStepConnection = ((MqttConnectedTestStep)testStep).getConnection();
                        if(testStepConnection != null){
                            for(int row: rows){
                                ConnectionRecord record = tableModel.getItem(row);
                                if(record.originalConnection == testStepConnection){
                                    if(result.size() == maxRowCount){
                                        result.add("...");
                                        return result;
                                    }
                                    else {
                                        result.add(String.format("\"%s\" of \"%s\" test case", testStep.getName(), testCase.getName()));
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return result;
}
 

开发者ID:SmartBear,
项目名称:ready-mqtt-plugin,
代码行数:35,
代码来源:ConfigureProjectConnectionsDialog.java

示例7: formUsageData

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
private HashMap<Connection, List<TestStep>> formUsageData() {
    HashMap<Connection, List<TestStep>> usageData = new HashMap<>();
    List<? extends TestSuite> testSuites = connectionsTargetItem.getTestSuiteList();
    if (testSuites != null)
        for (TestSuite testSuite : testSuites) {
            List<? extends TestCase> testCases = testSuite.getTestCaseList();
            if (testCases == null)
                continue;
            for (TestCase testCase : testCases) {
                List<TestStep> testSteps = testCase.getTestStepList();
                if (testSteps == null)
                    continue;
                for (TestStep testStep : testSteps)
                    if (testStep instanceof ConnectedTestStep) {
                        Connection testStepConnection = ((ConnectedTestStep) testStep).getConnection();
                        if (testStepConnection != null) {
                            List<TestStep> usingItems = usageData.get(testStepConnection);
                            if (usingItems == null) {
                                usingItems = new ArrayList<>();
                                usageData.put(testStepConnection, usingItems);
                            }
                            usingItems.add(testStep);
                        }
                    }
            }
        }
    return usageData;
}
 

开发者ID:hschott,
项目名称:ready-websocket-plugin,
代码行数:29,
代码来源:ConfigureProjectConnectionsDialog.java

示例8: getAffectedModelItems

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
private List<String> getAffectedModelItems(int[] rows, int maxRowCount) {
    ArrayList<String> result = new ArrayList<>();
    List<? extends TestSuite> testSuites = connectionsTargetItem.getTestSuiteList();
    if (testSuites != null)
        for (TestSuite testSuite : testSuites) {
            List<? extends TestCase> testCases = testSuite.getTestCaseList();
            if (testCases == null)
                continue;
            for (TestCase testCase : testCases) {
                List<TestStep> testSteps = testCase.getTestStepList();
                if (testSteps == null)
                    continue;
                for (TestStep testStep : testSteps)
                    if (testStep instanceof ConnectedTestStep) {
                        Connection testStepConnection = ((ConnectedTestStep) testStep).getConnection();
                        if (testStepConnection != null)
                            for (int row : rows) {
                                ConnectionRecord record = tableModel.getItem(row);
                                if (record.originalConnection == testStepConnection)
                                    if (result.size() == maxRowCount) {
                                        result.add("...");
                                        return result;
                                    } else
                                        result.add(String.format("\"%s\" of \"%s\" test case",
                                                testStep.getName(), testCase.getName()));
                            }
                    }
            }
        }
    return result;
}
 

开发者ID:hschott,
项目名称:ready-websocket-plugin,
代码行数:32,
代码来源:ConfigureProjectConnectionsDialog.java

示例9: runTestSteps

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
/**
 * Run the test step defined into the SoapUI project and having the name 
 * contained into testStepNames.
 * @param endpointUrl The URL of the endpoint to use for request test steps.
 * @param testStepNames A list of test step names to execute
 * @return A list of TestReturn wrapper objects (one by executed test step)
 */
public List<TestReturn> runTestSteps(String endpointUrl, List<String> testStepNames){
   // Remember to force no proxy otherwise SoapUI will use system settings and will 
   // make them generally applied to everything going out through Apache Http Client
   // (and maybe also JDK HttpURLConnection ?).
   ProxyUtils.setProxyEnabled(false);
   
   List<TestReturn> results = new ArrayList<TestReturn>();
   
   for (TestSuite testSuite : project.getTestSuiteList()){
      for (TestCase testCase : testSuite.getTestCaseList()){
         // Depending on testCase type build an accurate runner.
         TestCaseRunner testCaseRunner = buildTestCaseRunner(testCase);
         
         if (testCaseRunner != null){
            for (TestStep testStep : testCase.getTestStepList()){
               if (testStep instanceof HttpRequestTestStep && 
                     (testStepNames == null || testStepNames.contains(testStep.getName()))){
                  
                  log.debug("Picking up step " + testStep.getName() + " for running SoapUI test");
                  // Set the endpointUrl using this common interface for Soap and Rest requests.
                  ((HttpRequestTestStep)testStep).getHttpRequest().setEndpoint(endpointUrl);
                  
                  // Running tests also checks linked assertions.
                  TestStepResult result = testStep.run(testCaseRunner, testCaseRunner.getRunContext());
                  log.debug("SoapUI test result is " + result.getStatus());
                  
                  results.add(extractTestReturn(testStep.getName(), result));
               }
            }
         }
      }
   }
   return results;
}
 

开发者ID:microcks,
项目名称:microcks,
代码行数:42,
代码来源:SoapUITestStepsRunner.java

示例10: beforeStep

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
@Override
public void beforeStep(TestCaseRunner paramTestCaseRunner,
        TestCaseRunContext context, TestStep testStep) {
    service.startTestStep(testStep, context);
}
 

开发者ID:reportportal,
项目名称:agent-java-soapui,
代码行数:6,
代码来源:RPTestRunListener.java

示例11: getTestStep

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
@Override
public TestStep getTestStep() {
    return this;
}
 

开发者ID:SmartBear,
项目名称:ready-mqtt-plugin,
代码行数:5,
代码来源:ReceiveTestStep.java

示例12: setUsageData

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
public void setUsageData(HashMap<Connection, List<TestStep>> usageData){
    this.usageData = usageData;
}
 

开发者ID:SmartBear,
项目名称:ready-mqtt-plugin,
代码行数:4,
代码来源:ConfigureProjectConnectionsDialog.java

示例13: beforeTestStep

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
@Override
public void beforeTestStep(LoadTestRunner loadTestRunner, LoadTestRunContext context, TestCaseRunner testRunner,
        TestCaseRunContext runContext, TestStep testStep) {
    //
}
 

开发者ID:hschott,
项目名称:ready-websocket-plugin,
代码行数:6,
代码来源:ClientCacheCleanUpListener.java

示例14: beforeStep

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
@Override
public void beforeStep(TestCaseRunner testRunner, TestCaseRunContext runContext, TestStep testStep) {
    //
}
 

开发者ID:hschott,
项目名称:ready-websocket-plugin,
代码行数:5,
代码来源:ClientCacheCleanUpListener.java

示例15: getUsageData

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
public HashMap<Connection, List<TestStep>> getUsageData() {
    return usageData;
}
 

开发者ID:hschott,
项目名称:ready-websocket-plugin,
代码行数:4,
代码来源:ConfigureProjectConnectionsDialog.java

示例16: setUsageData

点赞 2

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
public void setUsageData(HashMap<Connection, List<TestStep>> usageData) {
    this.usageData = usageData;
}
 

开发者ID:hschott,
项目名称:ready-websocket-plugin,
代码行数:4,
代码来源:ConfigureProjectConnectionsDialog.java

示例17: getUsageData

点赞 1

import com.eviware.soapui.model.testsuite.TestStep; //导入依赖的package包/类
public HashMap<Connection, List<TestStep>> getUsageData(){return usageData;} 

开发者ID:SmartBear,
项目名称:ready-mqtt-plugin,
代码行数:2,
代码来源:ConfigureProjectConnectionsDialog.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)