Test and Production environments in Azure

Jonathan Porras 1 Reputation point
2020-08-26T15:49:19.273+00:00

We are developing a Mobile App. We are going to use Hub Notifications and send Notifications from Back End to each
mobile with the App Installed.

We have 3 environments before deploying in Production environment.

For example:

  1. Develop Environment
  2. Test Environment
  3. Pre Production Environment
  4. and Finally Production Environment.

In our develop process we have to send push notifications from each enviroment.
We have not very clear how to handle the environments in Azure.

I suppose, we must have a suscription for Production where
only the customer of the App in Production will receive push notifications.

So, the BIG Question is: how should we handle the test enviroments in Azure? I mean, When I send a push notifications from out BackEnd Develop, Test or Pre Production Environment where does the push Notification should it arrive in Azure?

Under this scenario we are thinking we could have

DevelopEnvironment@Stuff .com
TestEnvironment@Stuff .com
PreProductionEnvironment@Stuff .com
FinallyProductionEnvironment@Stuff .com

and suscribe that four accounts in Azure and send push notification to each enviroments as appropriate. From Mobile, I should hardcoded the enviroments and send the tag to the correct environment

Is that Ok what we are thinking?
How are you manage this?

Thanks a lot.

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
324 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. brtrach-MSFT 16,581 Reputation points Microsoft Employee
    2020-08-27T15:52:49.077+00:00

    @Jonathan Porras , yes that is the correct approach that you have outlined. As called out in our doc, you will want one Notification Hub per app per environment. That means all four of your environments for this single app should have their own Notification Hubs.

    Never share the same notification hub for production and test environments. This practice might cause problems when sending notifications. (Apple offers Sandbox and Production Push endpoints, each with separate credentials.)

    Please let us know if you have further questions or concerns on this matter.

    1 person found this answer helpful.
    0 comments No comments

  2. sadomovalex 3,631 Reputation points
    2020-08-28T15:43:13.007+00:00

    hello, push notifications are sent to device registrations in used notification hub which is used on the current env. So if the same notification hub will be used e.g. for Test and Prod environments - it is possible that real users will get test notifications. One way to handle that is to create different notification hubs. Another approach is to use Routing and tag expressions in order to route push notifications to test and prod device registrations (e.g. by adding tags Test/Prod to registrations). Visual Studio's server explorer for Azure notification hub allows to see current registrations together with their tags - it is useful for debugging.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.