How to do setup to run tests that involve blockstore?

What are the steps that I need to follow to run tests that involve blockstore. For example these: content library tests. As far as I understand I have to create a separate blockstore server specifically for running tests, is there any way to run it on the main blockstore server? Other will the test blockstore database handle all necessary testing cleanups and teardowns by itself or would I need to set those up manually as well?

Hi @Labeeb, in April 2022 (“Nutmeg” version of the Open edX platform), blockstore was added into the platform so that it no longer needed to be run as a separate server. Then since early 2024, in the latest versions of Open edX (Redwood, Sumac, master), Blockstore has been entirely replaced by Learning Core which is also built into edx-platform.

If you are trying to run the tests because you are developing some sort of new functionality or integrations, then I highly recommend you use the latest “master” version of the platform. Otherwise, you’ll have to re-do all the work when you upgrade to the newer version and its new APIs. If you are using the latest version, the tests should all “just work” and no special setup is required.