How do I test a custom extension on a test store without deploying to the live stores

How do you all handle testing extensions and apps? We have a test store in our plus plan which is pretty much a direct copy of our live store but it’s in test mode. Credit card payments, for example, are bogus.

I have a number of extensions that I’m ready to install on the live store that are all tested on this test store. Once those extensions are installed on the live store, how do I modify and test an extension in our test store without it affecting the live store installation until testing is done? If I “shopify app deploy” it will deploy it to all the stores with the app installed. That’s not a good thing.

Well, I don’t know if this is the proper or accepted way but here is what I did and I hope it helps someone else.

I have 6 extension apps. app-1 to app-6, let’s say. They’re working in my test store.

First, I uninstalled all 6 apps from my test store (we have a plus account so one of our stores is strictly a test/dev store).

  • In my partner dashboard I renamed the apps to app-1-d, app-2-d, etc. to signify “development”
  • Then, in each app directory, I renamed the shopify.app.toml file to shopify.app.app-1-d.toml, shopify.app.app-2-d.toml, etc.
  • I edited the renamed .toml file and changed the name of the app and the handle
    • name = “app-1-d”
    • handle = "app-1-d
  • then I deployed the app: “shopify app deploy”
  • re-installed in the my test store
  • recreated the functions where necessary

Then, for each app

  • manually created a new app in my partner dashboard using the original name: app-1, app-2, etc.
  • copied the app .toml file to “shopify.app.app-1-p.toml” for “production”
  • edited the new .toml file
    • client_id = “” (from the partner dashboard for the new app)
    • name = “app-1”
    • handle = “app-1”
  • deployed the app using "shopify app deploy --config=shopify.app.app1-p.toml
  • generated a new custom link
  • installed on the live store
  • created the functions where necessary

When “shopify app deploy” or “shopify app dev” is run without a --config parameter, the CLI uses the first .toml file it finds in the application directory, sorted by name. So, in this case “shopify app deploy” will use the “-d” version .toml file by default because it comes first in alphabetical order.

Again, I hope this helps someone else. Please, comment on this if you wish. If this is not the best way to handle dev vs live apps, I am most certainly open to suggestions.