concordialang-
, for example: concordialang-my-awesome-plugin
.package.json
file must contain the property concordiaPlugin
, like in the following example:concordiaPlugin
:file: string
: Relative path of the file that contains an implementation of the Plugin
interface.class: string
: Class (name) that implementsPlugin
.serve: string
: Multi-platform console command to execute in order to start the testing server. Whether the testing framework does not need running a testing server, you can set something like echo \"Running a testing server is not needed.\"
.feature1.testcase
:.testcase
file. These comments will help to track the specification in case of test script failures.npx
and generate a report using Mocha JUnit Reporter, the command to run could be the following:TestScriptExecutionResult
that will be returned to Concordia Compiler.ReportConverter
..testcase
file from a test script. When a test script has a failure or an error, the report saves the stack trace where it occurred. For instance, tests/feature1.js:20:4
indicates, respectively, the file, line and column where the problem happened. You can use these data to read the line of the test script file and retrieve the line comment that contains the corresponding line in the .testcase
file. ReportConverter
did in the method extractScriptLocationFromStackTrace
. Then you can use the class FileInstrumentationReader
from concordialang-plugin to retrieve the location from the line comment. Example:tests/feature1.js:7:8
is... 10
and column 4
fromfeature1.testcase
would give us:TestScriptExecutionResult
, both test failures and errors are represented as an exception
which includes the properties scriptLocation
and specLocation
.concordialang-
. We recommend that it includes the target framework, tools or language. Example: concordialang-selenium-python
to create a plug-in that generates test scripts for the Selenium framework and the Python language. You may use the opened issue (step 1) to get feedback about the name, if you wish.npm --init
.concordiaPlugin
to your package.json
file.tsconfig.json
file. If you use Jest, your test folder will probably be named __tests__
. We also recommend you to add a .editorconfig
file and a .gitignore
file (the latter should include the folder node_modules
).