Cleaning data for integration tests

Cleaning data for integration tests

SqueeDee
Shopify Partner
2 0 0

I'd like to remove all the products, customers, plugins and apps from a store (possibly independently) so that I can run integration tests without concerns about data collision. I can use a hashed suffix on all handles and identifiers in most cases, however "query" based tests (that return results on a category or label, with uniqueness expectations, for example) will return more and more results, making tests harder to maintain.

 

Is there a bulk clean api that doesn't require me to first page through all the data to establish the list of items to remove first?

 

It would be great if the API supported Integration testing so we can validate our themes, apps and flow integrations.

 

Related: https://community.shopify.com/c/graphql-basics-and/can-i-bulk-delete-products-with-bulk-mutation-api...

Reply 1 (1)

tedtate
Shopify Staff
18 2 3

👋 Hi @SqueeDee ,

 

There is not currently a bulk deletion API for any of the admin resources. I will take this feedback back to the team to see what they think but its not something we have on our roadmap currently.

 

Ted