Hi,

if you are using the Console report format, you can simply write to System.out.

Otherwise, if you want a more fine-grained solution that applies to multiple reporters, you can decorate any existing reporter extending PrintStreamOutput and use the method

protected void print(String text);

Cheers

On 17/11/2014 22:05, Ireneusz Kordal wrote:
Hi,

Is there a way to include in a report some additional lines of text passed from inside of step methods ? Most of our test are using some dynamic parameters generated by the application during runtime (unique case numbers, barcode numbers etc.), and I want to show these values in the report, so testers can easily see them directly on the report, and don't have to search through log files to find them (actually we are loging this information using log4j). Some kind of functionality that they have in Thucidides: http://thucydides.info/docs/thucydides-one-page/thucydides.html#_using_step_methods_to_document_test_cases

For example:
Given A customer send us a request
When I scan a document on the scanner
And .........


@Given("A customer send us a request")
public void a_customer_send_request(){
  String requestNumber = generateReuest();
  appendToReport("Request number is " + requestNumber );
  ...
}

@When("I scan a document on the scanner")
public void i_scan_a_document(){
  String barcodeNumber = scanNewDocument();
  appendToReport("Barcode number is " + barcodeNumber );
 ...
}


And a final report might look like this:

Given A customer send us a request
   ==> Request number is 12345
When I scan a document on the scanner
   ==> Barcode number is 5554567

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to