Performing integration tests without affecting the production instance of GitLab

Hello! This is my first post!

I am seeking guidance on how to conduct integration and system tests without interfering with my GitLab production instance (Community Edition v16.7.0). Currently, my backend makes requests to the GitLab API, and I need to run comprehensive tests that involve the entire system. However, I do not want to impact the production instance every time I run these tests. Additionally, I haven’t found a way to perform the equivalent of a database rollback but applied to GitLab.

I have considered some strategies, such as mocking API responses for testing (which would significantly reduce the value of these tests at this level since what I want to test is the actual interaction of the entire system). However, I would like to know if anyone has experience with this issue and what strategies or tools they could recommend to address it more effectively.

I would greatly appreciate any advice, suggestions, or experiences you can share. Thank you in advance!

Probably the easiest would be to backup your production instance, and then restore it to a test instance so you can use that for your tests/checks so that you don’t impact production. That way on the test system you can test at full load via API or whatever to see what kind of effect it would have on the server (if at all).