Unit Testing Support

Introduction

When developing services, unit testing is a good practice to test small units of your code, which ensures a stable quality of the delivered code.

Unit Testing Support in IBM Industry Solutions Workbench

IBM Industry Solutions Workbench provides the possibility to easily include unit testing in your service development.

The extension is available for the following stacks:

  • Java Spring Boot Stack 2.0.0 and later
  • Java Spring Boot Stack 1.0.0 (only for Domain services and always enabled)
  • NodeJS TypeScript Stack (only for Domain services and always enabled)

When Unit Testing Support is enabled, written unit tests can be automatically executed during pipeline execution. This way, failing unit tests, will prevent a service from being deployed to the deployment target or released as component. For more details about unit testing within the pipeline, please see here.

Java Spring Boot Stack

For Java Spring Boot Stack projects, JUnit is added to the dependencies of your project, which allows you to easily write unit tests for your implemented use cases. For more details, please check the related section here.

NodeJS TypeScript Stack

For NodeJS TypeScript Stack projects, Mocha and Chai are meant to be used for unit testing. To learn more about the automatically executed unit tests in TypeScript projects can be found here.