Package com.eviware.soapui.model.testsuite

Examples of com.eviware.soapui.model.testsuite.TestStep


        while (popup.getComponentCount() > 1) {
            popup.remove(1);
        }

        if (row < statisticsTable.getRowCount() - 1) {
            TestStep testStep = loadTest.getStatisticsModel().getTestStepAtRow(row);
            ActionSupport.addActions(ActionListBuilder.buildActions(testStep), popup);
        }

        popup.setLocation((int) (statisticsTable.getLocationOnScreen().getX() + e.getPoint().getX()),
                (int) (statisticsTable.getLocationOnScreen().getY() + e.getPoint().getY()));
View Full Code Here


        protected TestStepsTreeNode() {
            super(new WsdlTestStepsModelItem(getTestCase()));

            for (int c = 0; c < getTestCase().getTestStepCount(); c++) {
                TestStep testStep = getTestCase().getTestStepAt(c);
                testStepNodes.add(createTestStepTreeNode(testStep));
            }

            getTreeModel().mapModelItems(testStepNodes);
        }
View Full Code Here

        }
    }

    public void afterStep(TestCaseRunner testRunner, TestCaseRunContext runContext, TestStepResult result) {
        TestStep currentStep = result.getTestStep();
        TestCase testCase = currentStep.getTestCase();

        if (result.getStatus() == TestStepStatus.FAILED) {
            if (maxErrors > 0) {
                Integer errors = errorCount.get(testCase);
                if (errors == null) {
View Full Code Here

        if (testCase != null) {
            int ix = name.indexOf(PROPERTY_SEPARATOR);
            if (ix > 0) {
                String teststepname = name.substring(0, ix);
                TestStep refTestStep = testCase.getTestStepByName(teststepname);
                if (refTestStep != null) {
                    TestProperty property = refTestStep.getProperty(name.substring(ix + 1));
                    return property == null ? null : property.getValue();
                }
            }

            if (testCase.getSearchProperties()) {
View Full Code Here

    public void setProperty(String name, Object value, TestCase testCase) {
        int ix = name.indexOf(PROPERTY_SEPARATOR);
        if (ix > 0) {
            String teststepname = name.substring(0, ix);
            TestStep refTestStep = testCase.getTestStepByName(teststepname);
            if (refTestStep != null) {
                TestProperty property = refTestStep.getProperty(name.substring(ix + 1));
                if (property != null && !property.isReadOnly()) {
                    property.setValue(value.toString());
                    return;
                }
            }
View Full Code Here

    @Test
    public void testProvider()
    {
        CurrentStepRunIndexProvider provider = new CurrentStepRunIndexProvider();

        TestStep mockStep1 = Mockito.mock( TestStep.class );
        Mockito.when( mockStep1.getId()).thenReturn( "1234" );

        TestStep mockStep2 = Mockito.mock( TestStep.class );
        Mockito.when( mockStep2.getId()).thenReturn( "2345" );

        TestStepResult mockResult1 = Mockito.mock( TestStepResult.class );
        Mockito.when( mockResult1.getTestStep()).thenReturn( mockStep1 );

        TestStepResult mockResult2 = Mockito.mock( TestStepResult.class );
View Full Code Here

                putValue(Action.SHORT_DESCRIPTION,
                        "Runs this assertion script against the last messageExchange with a mock testContext");
            }

            public void actionPerformed(ActionEvent event) {
                TestStep testStep = getAssertable().getTestStep();
                MessageExchange exchange = null;

                if (testStep instanceof WsdlTestRequestStep) {
                    exchange = new WsdlResponseMessageExchange(((WsdlTestRequestStep) testStep).getTestRequest());
                } else if (testStep instanceof RestTestRequestStepInterface) {
View Full Code Here

        Set<String> currentEndpointSet = new HashSet<String>();

        endpointSet.add(USE_CURRENT);

        for (int c = 0; c < testCase.getTestStepCount(); c++) {
            TestStep step = testCase.getTestStepAt(c);
            if (step instanceof HttpRequestTestStep) {
                HttpRequestTestStep requestStep = (HttpRequestTestStep) step;
                Operation operation = requestStep.getTestRequest().getOperation();
                if (operation != null) {
                    String[] endpoints = operation.getInterface().getEndpoints();
                    for (int i = 0; i < endpoints.length; i++) {
                        endpointSet.add(endpoints[i]);
                    }
                }
                currentEndpointSet.add(requestStep.getTestRequest().getEndpoint());
            }
        }

        String selected = (String) UISupport.prompt("Select endpoint to set for all requests", "Set Endpoint",
                endpointSet.toArray(), currentEndpointSet.size() == 1 ? currentEndpointSet.iterator().next() : USE_CURRENT);

        if (selected == null || selected.equals(USE_CURRENT)) {
            return;
        }

        int cnt = 0;

        for (int c = 0; c < testCase.getTestStepCount(); c++) {
            TestStep step = testCase.getTestStepAt(c);
            if (step instanceof HttpRequestTestStep) {
                HttpRequestTestStep requestStep = (HttpRequestTestStep) step;
                TestRequest testRequest = requestStep.getTestRequest();

                if (testRequest.getEndpoint() == null || !testRequest.getEndpoint().equals(selected)) {
View Full Code Here

            super("OK");
        }

        public void actionPerformed(ActionEvent e) {
            for (int c = 0; c < testCase.getTestStepCount(); c++) {
                TestStep step = testCase.getTestStepAt(c);
                if (step instanceof WsdlTestRequestStep) {
                    WsdlTestRequestStep requestStep = (WsdlTestRequestStep) step;
                    requestStep.getTestRequest().setUsername(form.getComponentValue(USERNAME));
                    requestStep.getTestRequest().setPassword(form.getComponentValue(PASSWORD));
                    requestStep.getTestRequest().setDomain(form.getComponentValue(DOMAIN));
View Full Code Here

                if (result == null) {
                    log.warn("Result [" + c + "] is null in TestCase [" + testCase.getName() + "]");
                    continue;
                }

                TestStep testStep = result.getTestStep();

                if (!samplesMap.containsKey(testStep)) {
                    samplesMap.put(testStep, new TestSample(testStep));
                }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.testsuite.TestStep

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.