Concordion execute Command - Concordion

What is Concordion execute Command?

Concordion execute command is used run the operation of concordion fixture. Consider the following requirement −

If we want to write a specification for a sum function which will accept two numbers and output their sum, then the specification will be as follows −

When Concordion parses the document, it will set a temporary variable #firstNumber to be the value "2" and #secondNumber to be the value "3" and then execute the sum() method with parameters as #firstNumber and #secondNumber using the execute command and set the result into #result variable and check that the #result variable is equal to "5".

Example

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

Step

Description

1

Create a project with a nameconcordionand create a packagecom.wisdomjobsunder thesrcfolder in the created project.

2

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

3

Create Java classSystemunder thecom.wisdomjobspackage.

4

Create Fixture classSystemFixtureunder thespecs.wisdomjobspackage.

5

Create Specification htmlSystem.htmlunder thespecs.wisdomjobspackage.

6

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 the System.java file −


Following is the content of the SystemFixture.java file −

Following is the content of the System.html file −

Once you are done with creating 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 −


concordion_output

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Concordion Topics