cucumber.pro.publisher
Class LineResultPublisher

java.lang.Object
  extended by cucumber.pro.publisher.LineResultPublisher

public class LineResultPublisher
extends Object

Utility for publishing line results to Cucumber Pro. This class should be used by plugins for various testing tools such as Cucumber-JVM, JUnit, TestNG etc.


Constructor Summary
LineResultPublisher(URL baseUrl, Scm scm)
           
 
Method Summary
 void finish(long timeoutMillis)
           
 void publishLineResult(String pathOrFragment, Integer line, Status status, List<Attachment> attachments)
          Publishes a line result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineResultPublisher

public LineResultPublisher(URL baseUrl,
                           Scm scm)
Method Detail

publishLineResult

public void publishLineResult(String pathOrFragment,
                              Integer line,
                              Status status,
                              List<Attachment> attachments)
Publishes a line result.

A line result represents the result of a single line in a file. The file can be identified either by a relative path name from the root of the repo, or a path fragment in the repo. The latter is useful when the relative path is unknown. This happens for example in Cucumber-JVM when a feature file is loaded from within a jar file. We then assume that the path inside the jar will also exist somewhere on the filesystem (in the repo) as source. The relative path will be found (and validated for presence in the scm) in that case.

If nothing is found it is considered an error (typically that the file exists, but it's not in the scm). The method then throws a CucumberException.

No validation is performed to verify that the line is within the bounds of the file.

Parameters:
pathOrFragment - a relative path or a path fragment.
line - the line of the result.
status - the status of the result.
attachments - attachments to the result.

finish

public void finish(long timeoutMillis)
            throws InterruptedException
Throws:
InterruptedException


Copyright © 2013. All Rights Reserved.