🌎 Translations: Português
Generate functional tests automatically from your Agile specification.
At a glance:
Write agile requirements specifications in Concordia Language.
Use the Concordia Compiler to setup the testing environment for you.
Use the Concordia Compiler to generate and execute functional test scripts from your Concordia specification. No coding required.
👉 Are you migrating from version
1.x? Please read the Migration Guide.
Both test cases and test scripts receive test data and test oracles. You don't have to produce them manually - they are inferred from your specification.
Concordia Compiler uses plug-ins for transforming test cases (
.testcase files) into test scripts, i.e. source code, and for setting the test environment up for you. Every plug-in can generate test scripts for a different programming language and testing framework, for web, mobile, or desktop applications.
Why using it ?
Simple, flexible syntax.
Separate high-level, business language declarations from medium-low-level, computing language declarations, improving the communication between your team, customers, and other stakeholders. Thus, you can use a same document to discuss features with stakeholders, analysts, testers, and developers, and facilitate the adoption of BDD/ATDD/SbE.
Make your specifications more useful. Get automated functional tests from your specification easily and drive your development covered by tests.
Add test automation to new or legacy applications without having to write code.
Generate relevant test cases and test scripts in a few milliseconds. Get tests that adopt techniques such as equivalence partitioning, boundary value analysis, combinatorial testing (n-wise), and random testing without having to think about (and invest your time in) them all.
Reduce the need of writing negative scenarios (those scenarios that handle incorrect or invalid input) by describing system rules of user interface elements. Concordia supports complex, dynamic system rules.
Create rules with data from files or databases and Concordia will use them for producing the test cases.
Track your specification from the produced test cases and test scripts. They receive special line (code) comments that refer to the specification and the adopted testing techniques.
Add test cases without coding. Write them with Concordia and let the compiler convert them into source code.
Use a plain text requirements specification that is version control-friendly and can evolve with your application.
After installing the dependencies, open the console/terminal to execute the installation command.
1. Recommend Installation
npm install -g concordialang
Linux or MacOS
sudo npm install -g concordialang
Checking the installation
👉 Note that
concordia is the command to be used from now on, which is different from
concordialang (used to install).
2. Local Installation
Concordia Compiler can also be installed locally, inside your application's directory, and executed with NPX. NPX is already included in NodeJS
8.2.0 or above.
Windows, Linux or MacOS
cd my-applicationnpm install concordialang
However, you will need to use
npx before all the Concordia commands. Example:
npx concordia --version
Let's create a basic, "hello world"-like example. In order to run its tests, you will need an Internet connection and the Google Chrome web browser installed.
Step 1: Create a directory
Create a directory named
search and then access it using the terminal:
mkdir searchcd search
💬 Quick Tip: If you are using Windows, you may create a empty folder using Windows Explorer, open it, and then type
cmdin the address bar.
Step 2: Configure
Execute the following command to guide the setup process:
👉 On Linux or MacOS you may need to use
sudo before the command, whether your NodeJS' version is less than
8.2 or you are using Concordia
You'll be asked about your preferences and they will be stored in a configuration file named
.concordiarc. LET ALL THE DEFAULT VALUES, by typing Enter for all the questions.
Plug-ins will also be installed during the process. If you want to install them manually, please take a look at the plugins page.
Step 3: Start the test server
Test automation tools often use a test server to control a web browser, a device emulator or a real device. So, first you start a test server, then you run all the test scripts.
Since a test server usually blocks the current terminal/console, open a new terminal/console.
💬 Quick Tip: If you are using Windows, you can start a new terminal from you current directory by running:start cmd .
Concordia Compiler facilitates to start a test server by giving you a parameter
--plugin-serve. In the new terminal, run the following command:
It is likely that your testing server remain open. To stop it later (not now, please), just type Ctrl + C.
Step 4: Create a feature
Create the directory
features, which is the place for feature files:
Now use your favorite (UTF-8) text editor to create a file named
search.feature, inside the directory
features, with the following content:
Feature: SearchAs a visitorI would like to search using keywordsIn order to find what I needScenario: Search returns the expected resultGiven that I am in the search screenWhen I enter with the search contentand I choose the search optionThen I see a result that matches the search contentVariant: Search content on pressing EnterGiven that I am on ""When I type "concordialang.org" in <q>And I press "Enter"Then I see "npm"
Feature and Scenario are high-level, business-focused descriptions about the problem to solve. A Variant describes the expected interaction with the application's user interface in order to perform a Scenario. Thus, a Variant uses a more technological vocabulary.
👉 In Concordia, all the interactions with the application's user interface use first person singular ("I"). That "I" represents the actor that is interacting with the application (in the example above, a visitor).
Step 5: Execute
search directory, just execute:
Concordia Compiler will:
- setup the testing environment;
- generate a test case;
- transform the test case into a test script;
- execute the test script; and
- report the test script result.
Your browser should open automatically during this process and the console will show the execution results.
Some generated files:
features/search.testcase, that will contain the produced test case:
# Generated with ❤ by Concordia## THIS IS A GENERATED FILE - MODIFICATIONS CAN BE LOST !import "search.feature"@generated@scenario(1)@variant(1)Test case: Search content on pressing Enter - 1Given that I am on ""When I type "concordialang.org" in <q>And I press "Enter"Then I see "npm"
In the example above, there is a Test Case generated from the Variant declared in
import clause imports that file's content. The tag
@generated indicates that the Test Case was produced automatically, while the tags
@variant refers to its Scenario and Variant by their positions (indexes).
test/search.js, that will contain the test script produced from
features/search.testcase for the framework CodeceptJS with WebDriverIO:
// Generated with ❤ by Concordia// source: search.testcase//// THIS IS A GENERATED FILE - MODIFICATIONS CAN BE LOST !;;
To generate and run the test again, just repeat the last command.
👉 Remember, this is just a "hello word". Concordia has much more to offer!
katalon-concordia: browser extension for Chrome and Firefox that converts recordings from Katalon Recorder to Concordia Language. It's very useful for discovering the elements' identification in web applications (e.g., their
idproperties or their XPath).
concordialang-codeceptjs-webdriverio: plug-in to generate and execute test scripts for CodeceptJS and WebDriverIO. Use it to test web applications.
concordialang-codeceptjs-appium: plug-in to generate and execute test scripts for CodeceptJS and Appium. Use it to test mobile or desktop applications.
- Did you liked it? Give it a Star ⭐ on GitHub
- Help translating the documentation. You may create a Fork and submit a Pull Request with any translated documents. Partial translations also help us a lot!
- Chat with us on Slack or open an Issue with a question or suggestion.
- Report bugs or typos.
- Create a new plug-in for your favorite programming language or testing framework or develop Concordia with us.
- Include this badge in your project's page →