Package com.gramant.jtr.log

Examples of com.gramant.jtr.log.Step


    public void addElementResult(Element element, TestResult result, List<Step> steps) throws IOException {
        element.setAttribute("end", DATE_FORMAT.format(new Date()));
        element.setAttribute("result", result.name());
        for (int i = 0; i < steps.size(); i++) {
            Element stepElement = new Element("step");
            Step step = steps.get(i);
            if (step.getAction() != null) {
                Element actionElement = new Element("action");
                actionElement.setText(step.getAction());
                stepElement.addContent(actionElement);
            }
            if (step.getResult() != null) {
                for (int j = 0; j < step.getResult().size(); j++) {
                    Element actionElement = new Element("result");
                    actionElement.setText(step.getResult().get(j).toString());
                    stepElement.addContent(actionElement);
                }
            }
            if (step.getErrorResult() != null) {
                for (int j = 0; j < step.getErrorResult().size(); j++) {
                    Element actionElement = new Element("error");
                    actionElement.setText(step.getErrorResult().get(j).toString());
                    stepElement.addContent(actionElement);
                }
            }
            if (step.getScreenShot() != null) {
                Element scrElement = new Element("screen-shot");
                scrElement.setText(step.getScreenShot().getPath());
                scrElement.setAttribute("title", step.getScreenShot().getTitle());
                stepElement.addContent(scrElement);
            }
            element.addContent(stepElement);
        }
        writeSuiteFile();
View Full Code Here

TOP

Related Classes of com.gramant.jtr.log.Step

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.