question

JonathanPorras-8234 avatar image
0 Votes"
JonathanPorras-8234 asked bharathn-msft edited

Test and Production environments in Azure

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@gmail.com
TestEnvironment@gmail.com
PreProductionEnvironment@gmail.com
FinallyProductionEnvironment@gmail.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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

brtrach-MSFT avatar image
1 Vote"
brtrach-MSFT answered brtrach-MSFT edited

@JonathanPorras-8234, 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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

sadomovalex avatar image
0 Votes"
sadomovalex answered

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.