CodeceptJS is easy to set up with most modern CI systems.
This topic describes how to use CodeceptJS with TeamCity.
I’m not sure which one is convenient for you. Choose the one that suits you most
- Create a step in TeamCity to install the
allure-commandlinewhen the build is running
allure-commandlineis pre-installed in the TeamCity agent image
Adding a Build Step that installing the
Create a new build configuration or open an existing one as described in the TeamCity documentation.
Click the Edit Configuration Settings link.
In the configuration settings, add a build step that runs CodeceptJS. First, select Build Steps from the left menu.
This opens the Build Steps page. On this page, click the Add build step button.
Now add the step to run the CodeceptJS tests. This is just an example how to put a codeceptjs command line. This should be modified on your own.
Generate the allure report step
You’re almost there, now you need to create the allure reports from the allure results. Creating another step like this. Note the Execute step. We should do this to force the report to be generated anyway even though the previous step which is running the CodeceptJS failed
Expose your artifacts paths
In the configuration settings, add a build step that runs CodeceptJS. First, select General Settings from the left menu.
Configuring the artifacts paths
Configurations to show the allure reports tab
Go to Project Home, click the Report Tabs item, click Create new build report tab button and configuring as following
Once done, you will see something like this
The report is there for you
Phew! We do so much things actually, now it’s time to enjoy your things. Just run the build, once it’s done, you will see the Allure Report tab