• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java WsdlTestCase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: DropConnectionTestStep

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase; //导入依赖的package包/类
public DropConnectionTestStep(WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
    super(testCase, config, true, forLoadTest);
    if (!actionGroupAdded) {
        SoapUI.getActionRegistry().addActionGroup(new DropConnectionTestStepActionGroup());
        actionGroupAdded = true;
    }
    if (config != null && config.getConfig() != null) {
        XmlObjectConfigurationReader reader = new XmlObjectConfigurationReader(config.getConfig());
        readData(reader);
    }

    if (!forLoadTest) {
        initIcons();
    }
    setIcon(unknownStepIcon);
    TestMonitor testMonitor = SoapUI.getTestMonitor();
    if (testMonitor != null){
        testMonitor.addTestMonitorListener(this);
    }

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


示例2: getTestRequestStep

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase; //导入依赖的package包/类
private <T> T getTestRequestStep(WsdlProject project, Class<T> stepClass) {
    if (project.getTestSuiteCount() > 0) {
        WsdlTestSuite testSuite = project.getTestSuiteAt(project.getTestSuiteCount() - 1);
        if (testSuite != null && testSuite.getTestCaseCount() > 0) {
            WsdlTestCase testCase = testSuite.getTestCaseAt(testSuite.getTestCaseCount() - 1);
            if (testCase != null && testCase.getTestStepCount() > 0) {
                WsdlTestStep testStep = testCase.getTestStepAt(testCase.getTestStepCount() - 1);
                if (stepClass.isInstance(testStep)) {
                    return (T) testStep;
                }
            }
        }
    }
    return null;
}
 
开发者ID:SmartBear,项目名称:readyapi-postman-plugin,代码行数:16,代码来源:PostmanImporter.java


示例3: testImportWsdlRequest

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase; //导入依赖的package包/类
@Test
public void testImportWsdlRequest() {
    PostmanImporter importer = new PostmanImporter(new DummyTestCreator());
    WsdlProject postmanProject = importer.importPostmanCollection(workspace,
            PostmanImporterTest.class.getResource(WSDL_COLLECTION_PATH).getPath());

    assertEquals("Project should be named after collection", COLLECTION_NAME, postmanProject.getName());
    Map<String, Interface> interfaceMap = postmanProject.getInterfaces();
    assertEquals("Project should have 2 interface", 2, interfaceMap.size());
    Interface service = postmanProject.getInterfaceAt(0);
    assertThat(service, instanceOf(WsdlInterface.class));

    WsdlInterface wsdlInterface = (WsdlInterface) service;
    WsdlOperation operation = wsdlInterface.getOperationByName(OPERATION_NAME);
    assertNotNull("Operation is missing", operation);

    assertEquals("Operation should have 1 request", 1, operation.getRequestCount());
    WsdlRequest request = operation.getRequestAt(0);
    assertEquals("Request has wrong name", WSDL_REQUEST_NAME, request.getName());
    assertEquals("Request has wrong endpoint", SOAP_ENDPOINT, request.getEndpoint());

    WsdlTestSuite testSuite = postmanProject.getTestSuiteAt(0);
    WsdlTestCase testCase = testSuite.getTestCaseAt(0);
    WsdlTestRequestStep testStep = (WsdlTestRequestStep) testCase.getTestStepAt(0);
    TestAssertion assertion = testStep.getAssertionAt(0);
    assertThat(assertion, instanceOf(ValidHttpStatusCodesAssertion.class));
}
 
开发者ID:SmartBear,项目名称:readyapi-postman-plugin,代码行数:28,代码来源:PostmanImporterTest.java


示例4: DropConnectionTestStep

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase; //导入依赖的package包/类
public DropConnectionTestStep(WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
    super(testCase, config, true, forLoadTest);
    if (!actionGroupAdded) {
        SoapUI.getActionRegistry().addActionGroup(new DropConnectionTestStepActionGroup());
        actionGroupAdded = true;
    }
    if (config != null && config.getConfig() != null) {
        XmlObjectConfigurationReader reader = new XmlObjectConfigurationReader(config.getConfig());
        readData(reader);
    }

    if (!forLoadTest)
        initIcons();
    setIcon(unknownStepIcon);
}
 
开发者ID:hschott,项目名称:ready-websocket-plugin,代码行数:16,代码来源:DropConnectionTestStep.java


示例5: RiseConnectionTestStep

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase; //导入依赖的package包/类
public RiseConnectionTestStep(WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
    super(testCase, config, true, forLoadTest);
    if (!actionGroupAdded) {
        SoapUI.getActionRegistry().addActionGroup(new RiseConnectionTestStepActionGroup());
        actionGroupAdded = true;
    }
    if (config != null && config.getConfig() != null) {
        XmlObjectConfigurationReader reader = new XmlObjectConfigurationReader(config.getConfig());
        readData(reader);
    }

    if (!forLoadTest)
        initIcons();
    setIcon(unknownStepIcon);
}
 
开发者ID:hschott,项目名称:ready-websocket-plugin,代码行数:16,代码来源:RiseConnectionTestStep.java


示例6: buildTestCaseRunner

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase; //导入依赖的package包/类
/** */
private TestCaseRunner buildTestCaseRunner(TestCase testCase){
   if (testCase instanceof WsdlTestCase){
      return new WsdlTestCaseRunner((WsdlTestCase)testCase, new StringToObjectMap());
   }
   return null;
}
 
开发者ID:microcks,项目名称:microcks,代码行数:8,代码来源:SoapUITestStepsRunner.java


示例7: perform

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase; //导入依赖的package包/类
@Override
public void perform(WsdlTestCase testCase, Object o) {
    helper.showConsole(testCase);

    if (projectListener == null) {
        projectListener = new InternalProjectListener();
        testSuiteListener = new InternalTestSuiteListener();

        testCase.getTestSuite().addTestSuiteListener(testSuiteListener);
        testCase.getTestSuite().getProject().addProjectListener(projectListener);
        testCase.getTestSuite().getProject().getWorkspace().addWorkspaceListener(new InternalWorkspaceListener());
    }
}
 
开发者ID:olensmar,项目名称:soapui-groovy-console-plugin,代码行数:14,代码来源:TestCaseGroovyConsoleAction.java


示例8: createTest

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase; //导入依赖的package包/类
@Override
public void createTest(RestRequest request) {
    WsdlTestCase testCase = createTestHierarchyForRequest(request.getProject());
    String stepName = request.getRestMethod().getName() + " - " + request.getName();
    testCase.addTestStep(RestRequestStepFactory.createConfig(request, stepName));
}
 
开发者ID:SmartBear,项目名称:readyapi-postman-plugin,代码行数:7,代码来源:DummyTestCreator.java


示例9: createTestHierarchyForRequest

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase; //导入依赖的package包/类
private WsdlTestCase createTestHierarchyForRequest(WsdlProject project) {
    WsdlTestSuite testSuite = project.addNewTestSuite("TestSuite 1");
    return testSuite.addNewTestCase("TestCase 1");
}
 
开发者ID:SmartBear,项目名称:readyapi-postman-plugin,代码行数:5,代码来源:DummyTestCreator.java


示例10: testImportRestGetRequest

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase; //导入依赖的package包/类
@Test
public void testImportRestGetRequest() {
    PostmanImporter importer = new PostmanImporter(new DummyTestCreator());
    WsdlProject postmanProject = importer.importPostmanCollection(workspace,
            PostmanImporterTest.class.getResource(REST_GET_COLLECTION_PATH).getPath());

    TestProperty property1 = postmanProject.getProperty(PROPERTY1_NAME);
    assertNotNull("Property1 is missing", property1);
    assertEquals("Property1 has wrong value", PROPERTY1_VALUE, property1.getValue());

    TestProperty property2 = postmanProject.getProperty(PROPERTY2_NAME);
    assertNotNull("Property2 is missing", property2);
    assertEquals("Property2 has wrong value", PROPERTY2_VALUE, property2.getValue());

    assertEquals("Project should be named after collection", COLLECTION_NAME, postmanProject.getName());
    Map<String, Interface> interfaceMap = postmanProject.getInterfaces();
    assertEquals("Project should have 1 interface", 1, interfaceMap.size());
    Interface service = postmanProject.getInterfaceAt(0);
    assertThat(service, instanceOf(RestService.class));

    RestService restService = (RestService) service;
    List<RestResource> resources = restService.getResourceList();
    assertEquals("Service should have 1 resource", 1, resources.size());
    RestResource resource = resources.get(0);
    assertEquals("Resource has wrong name", makeResourceName(GET_PATH), resource.getName());
    assertEquals("Resource has wrong path", GET_PATH, resource.getPath());


    assertEquals("Resource should have 1 method", 1, resource.getRestMethodCount());
    RestMethod method = resource.getRestMethodAt(0);
    assertEquals("Wrong method", HttpMethod.GET, method.getMethod());
    assertEquals("Method should have 1 request", 1, method.getRequestCount());
    RestRequest request = method.getRequestAt(0);
    assertEquals("Request has wrong name", REQUEST_NAME, request.getName());
    assertEquals("Request has wrong endpoint", REST_ENDPOINT, request.getEndpoint());
    checkParams(postmanProject, request.getParams());
    List<RestParamProperty> headers = getParamsOfStyle(request.getParams(), ParameterStyle.HEADER);
    assertEquals("Request must have 2 headers", 2, headers.size());
    for (RestParamProperty header : headers) {
        if (header.getName().equals(HEADER1_NAME)) {
            assertEquals("Header1 has wrong value", HEADER1_VALUE, header.getValue());
        } else {
            assertEquals("Header2 has wrong value", HEADER2_VALUE, header.getValue());
        }
    }

    WsdlTestSuite testSuite = postmanProject.getTestSuiteAt(0);
    WsdlTestCase testCase = testSuite.getTestCaseAt(0);
    RestTestRequestStep testStep = (RestTestRequestStep) testCase.getTestStepAt(0);
    TestAssertion assertion = testStep.getAssertionAt(0);
    assertThat(assertion, instanceOf(ValidHttpStatusCodesAssertion.class));

    checkParams(postmanProject, testStep.getTestRequest().getParams());
}
 
开发者ID:SmartBear,项目名称:readyapi-postman-plugin,代码行数:55,代码来源:PostmanImporterTest.java


示例11: testImportRestPostRequest

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase; //导入依赖的package包/类
@Test
public void testImportRestPostRequest() {
    PostmanImporter importer = new PostmanImporter(new DummyTestCreator());
    WsdlProject postmanProject = importer.importPostmanCollection(workspace,
            PostmanImporterTest.class.getResource(REST_POST_COLLECTION_PATH).getPath());

    assertEquals("Project should be named after collection", COLLECTION_NAME, postmanProject.getName());
    Map<String, Interface> interfaceMap = postmanProject.getInterfaces();
    assertEquals("Project should have 1 interface", 1, interfaceMap.size());
    Interface service = postmanProject.getInterfaceAt(0);
    assertThat(service, instanceOf(RestService.class));

    RestService restService = (RestService) service;
    List<RestResource> resources = restService.getResourceList();
    assertEquals("Service should have 1 resource", 1, resources.size());
    RestResource resource = resources.get(0);

    assertEquals("Resource has wrong name", makeResourceName(POST_PATH), resource.getName());
    assertEquals("Resource has wrong path", POST_PATH, resource.getPath());
    List<RestParamProperty> params = getParamsOfStyle(resource.getParams(), ParameterStyle.QUERY);
    assertEquals("Resource should have 0 query params", 0, params != null ? params.size() : 0);


    assertEquals("Resource should have 1 method", 1, resource.getRestMethodCount());
    RestMethod method = resource.getRestMethodAt(0);
    assertEquals("Wrong method", HttpMethod.POST, method.getMethod());
    assertEquals("Method should have 1 request", 1, method.getRequestCount());
    RestRequest request = method.getRequestAt(0);
    assertEquals("Request has wrong name", POST_REQUEST_NAME, request.getName());
    assertEquals("Request has wrong endpoint", REST_ENDPOINT, request.getEndpoint());

    WsdlTestSuite testSuite = postmanProject.getTestSuiteAt(0);
    WsdlTestCase testCase = testSuite.getTestCaseAt(0);
    RestTestRequestStep testStep = (RestTestRequestStep) testCase.getTestStepAt(0);
    TestAssertion assertion = testStep.getAssertionAt(0);
    assertThat(assertion, instanceOf(SimpleContainsAssertion.class));

    RestTestRequest testRequest = testStep.getTestRequest();
    List<RestParamProperty> requestParams = getParamsOfStyle(testRequest.getParams(), ParameterStyle.QUERY);
    assertEquals("Request should have 0 query params", 0, requestParams != null ? requestParams.size() : 0);
    assertEquals("Request should have test body", REST_POST_BODY_VALUE, request.getRequestContent());
}
 
开发者ID:SmartBear,项目名称:readyapi-postman-plugin,代码行数:43,代码来源:PostmanImporterTest.java



注:本文中的com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TestFileBasedIPList类代码示例发布时间:2022-05-22
下一篇:
Java SimpleExpression类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap