Concordion Returning Object - Concordion

What is Concordion Returning Object?

Concordion execute command can be used to get the result of a behavior in the form of object using which we can get multiple outputs of a behavior. For example, consider the following requirement −

Here we need to have a split function which accepts a username and returns a result object having the first name and the last name as its properties so that we can use them.

If we want to write a specification for such a split function which will expect a user name and output a result object, then the following will be the specification –

When Concordion parses the document, it will set the value of the unique variable #text as the value of the current element as "Robert De" and pass it to the split function. Then it will execute the split() method with parameters as #text using the execute the command and set the result into the #result variable and using the result object, print the firstName and the lastName properties as the output.


Let us have a working Eclipse IDE in place and follow the steps given below to create a Concordion application –




Create a project with a nameconcordionand create a packagecom.wisdomjobs under the src folder in the created project.


Add the required Concordion libraries usingAdd External JARsoption as explained in theConcordion - First Applicationchapter.


Create Java classSystemunder thecom. wisdomjobspackage.


Create Fixture classSystemFixtureunder thespecs. wisdomjobspackage.


Create Specification htmlSystem.htmlunder thespecs. wisdomjobs package.


The final step is to create the content of all the Java files and specification file and run the application as explained below.

Here is the content of file −

Here is the content of file −

Following is the content of file−

Following is the content of System.html file −

Once you are done with creating the source and specification files, let us run the application as JUnit Test. If everything is fine with your application, then it will produce the following result −

System.html is the output of Concordion test run.


All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Concordion Topics