CodeceptJS Integration with TeamCity

CodeceptJS is easy to set up with most modern CI systems.

This topic describes how to use CodeceptJS with TeamCity.

Prerequisites

I’m not sure which one is convenient for you. Choose the one that suits you most

  1. Create a step in TeamCity to install the allure-commandline when the build is running
  2. allure-commandline is pre-installed in the TeamCity agent image

Adding a Build Step that installing the allure-commandline

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.

configure-build-steps

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. :slight_smile:

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.

49

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

27

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

1 Like