Package jp.vmi.selenium.selenese.result

Examples of jp.vmi.selenium.selenese.result.Result


        String indent = StringUtils.repeat("  ", holder.getLogIndentLevel());
        String cmdStr = command.toString();
        log.info(indent + cmdStr);
        clr.info(indent + cmdStr);
        try {
            Result result = (Result) invocation.proceed();
            logResult(clr, indent, cmdStr, result, context);
            return result;
        } catch (Exception e) {
            String msg = cmdStr + " => " + e.getMessage();
            log.error(indent + msg);
View Full Code Here


            String baseURL = StringUtils.defaultString(context.getOverridingBaseURL(), ((TestCase) testCase).getBaseURL());
            log.info("baseURL: {}", baseURL);
            clr.info("baseURL: " + baseURL);
        }
        try {
            Result result = (Result) invocation.proceed();
            if (jUnitResult != null) {
                if (result.isSuccess())
                    jUnitResult.setSuccess(testCase);
                else
                    jUnitResult.setFailure(testCase, result.getMessage(), null);
            }
            return result;
        } catch (Throwable t) {
            String msg = t.getMessage();
            log.error(msg);
View Full Code Here

     *
     * @param context Selenese Runner context.
     * @return result of command list execution.
     */
    public Result execute(Context context) {
        Result result = SUCCESS;
        CommandListIterator commandListIterator = listIterator();
        context.pushCommandListIterator(commandListIterator);
        try {
            while (commandListIterator.hasNext()) {
                ICommand command = commandListIterator.next();
                String[] curArgs = context.getVarsMap().replaceVarsForArray(command.getArguments());
                evalCurArgs(context, curArgs);
                result = result.update(doCommand(context, command, curArgs));
                if (result.isAborted())
                    break;
                context.waitSpeed();
            }
        } finally {
            context.popCommandListIterator();
View Full Code Here

        IRollupRule rollupRule = context.getRollupRules().get(rollupName);
        if (rollupRule == null)
            return new Error("No such rollup rule: " + rollupName);
        CommandList commandList = rollupRule.getExpandedCommands(context, kwArgsMap);
        commandList.setLogIndentLevel(context.getCommandListIterator().getLogIndentLevel() + 1);
        Result result = commandList.execute(context);
        return result == SUCCESS ? new Success("Success: " + rollupRule.getName()) : result;
    }
View Full Code Here

     *
     * @param filenames Selenese script filenames.
     * @return result.
     */
    public Result run(String... filenames) {
        Result totalResult = UNEXECUTED;
        List<TestSuite> testSuiteList = new ArrayList<TestSuite>();
        for (String filename : filenames) {
            Selenese selenese = Parser.parse(filename, commandFactory);
            Parser.setContextForBackwardCompatibility(selenese, this);
            if (selenese.isError()) {
                log.error(selenese.toString());
                totalResult = ((ErrorSource) selenese).getResult();
                continue;
            }
            switch (selenese.getType()) {
            case TEST_SUITE:
                testSuiteList.add((TestSuite) selenese);
                break;
            case TEST_CASE:
                TestSuite testSuite = Binder.newTestSuite(filename, selenese.getName());
                testSuite.addSelenese(selenese);
                testSuiteList.add(testSuite);
                break;
            }
        }
        if (totalResult != UNEXECUTED)
            return totalResult;
        for (TestSuite testSuite : testSuiteList) {
            Result result;
            try {
                result = execute(testSuite);
            } catch (RuntimeException e) {
                log.error(e.getMessage());
                throw e;
View Full Code Here

TOP

Related Classes of jp.vmi.selenium.selenese.result.Result

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.