Ask a Question

Lettuce RunRoutine Result

SOLVED
vikram_u_k
Contributor

Lettuce RunRoutine Result

Hi All,

  I am following the tutorial for Lettuce BDD and have the issue in generating the Result summary.

 

I am aware of theTC.Integration.RunRoutineEx COM example to get the results.  

Is there a way to return the results from the Execution could be returned to the Calling Steps.py file?.

 

 

In java 

Variant varient = World.TC().RunRoutine("Unit1.StepName");
System.out.println(varient.getBoolean());
assertEquals(true,varient.getBoolean());
System.out.println("Validation from StepName");
3 REPLIES 3
AlexanderLinkov
SmartBear Alumni (Retired)

Hello, vikram_u_k!

 

I am glad that you find this article useful. But as I can see, you use Cucumber, not Lettuce. So, if you did not see an article about Cucumber, you can find it here: "BDD: Cucumber + TestComplete".

 

As for your question, yes, it is possible to return results from TestComplete to your test step. Just add the return statement to your TestComplete routine:

 

 

[Unit1]
function StepName()
{ // ... if (expectedResult) { return true; } else
{ return false; }
}

I hope this information will help you solve the problem.

 



Alexander Linkov
SmartBear Technical Writer
 *Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.

Hi Support,

  Tried the approach given and have a issue with Cucumber HTML reporter.

https://groups.google.com/forum/#!topic/cukes/SaiUmv7Nd8k

 

Junit Report
 
  1. Given i launch Lotus
    java.lang.AssertionError: expected:<true> but was:<false>
    	at org.junit.Assert.fail(Assert.java:88)
    	at org.junit.Assert.failNotEquals(Assert.java:834)
    	at org.junit.Assert.assertEquals(Assert.java:118)
    	at org.junit.Assert.assertEquals(Assert.java:144)
    	at StepDefinition.Test_Steps.i_launch_Lotus(Test_Steps.java:54)
    	at ✽.Given i launch Lotus(features/Test.Feature:19)
  2. When i enter 0
  3. Then i should get the expected Value as 0

 

Report Generates:

 

Given i launch Lotus012ms
Error message
java.lang.AssertionError: expected: but was:

 

 
 

Any Inputs would be appreciated.

 

 

Hi,

  The Junit issue was related to a different Plugin.

https://github.com/damianszczepanik/cucumber-sandwich/issues/29

cancel
Showing results for 
Search instead for 
Did you mean: