E2E Testing on CumulocityIoT

Hi all,
this is Luca from DAC.

As the title suggests we aim to end-to-end test our application using Cypress.

We are developing a custom application based on Cumulocity Cockpit.

Each test should go through the following steps

  1. clean environment
  2. setup (e.g. create a dashboard, create a device, place a map in the dashboard)
  3. test (e.g. check if a marker is placed in the map)

The question is about step 1. During this step we would get rid of anything the previous tests have created like alarms, managed objects […] .

How can we implement this step?

We could obviously call a “drop table” like function or something slightly smarter before each test but we consider this a backup plan.

Does the platform offer something to adress this? Any more elegant idea?


Hi Luca,

the simplest way of having a clean environment would be to create a new Cumulocity tenant for every run.
This may however create additional costs on your end, depending on your contract.

If the only stuff you are creating during testing in your tenant is device related, it might also be sufficient to just delete the device again afterwards, as this will also delete the alarms, events, measurements and operations associated to the device. If the dashboards are created on device level they would also be removed.


1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.