cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlwaysLearningJ
New Member

Testing and source control

Hi all!

I'm fairly new to power portals, and have been tasked with moving an existing .net application to Power Portals, so that it will interact better with our CRM back end. There are some areas that have been concerning me, and I wondered if anyone had any good hints...

1) Unit Testing
I come from a background of building unit tests for my .net components, front-end and back-end. When using custom HTML and Javascript in Portals, I want to be able to link my custom javascript methods and files into some kind of automated testing framework, but I can't see an easy way to do so. Does anyone have any ideas about how to do this? How do I do automated unit testing of my javascript files in Power Portals?

2) Source control
Is it possible to include the individual files in a portal into source control, so that I can do standard git procedures like merges, branches, rollbacks, etc, and then deploy these versions to different environments? I've seen stuff about using CI/CD pipelines to deploy, but that mostly seems to be saying 'use a query to specify part of your project, then that gets zipped up and saved'
=> How do I look at the code inside the zipped solutions in source control to check for changes between versions, for debugging purposes

 

3) Simultaneous development/development environment
I am used to working in Visual Studio Code, with multiple developers able to work on the same solution at the same time, then merge their changes without risk of overwriting each other's work. How can I do simultaneous development in Power Portals? What IDE can I use for power portals apart from the web interface and XRM Toolbox?

1 ACCEPTED SOLUTION

Accepted Solutions
ragavanrajan
Super User
Super User

Hi @AlwaysLearningJ , 

 

  Welcome to the PowerApps Portal forum.  The below answers are based on my personal experience and findings. Hope it will give you some insights into what you are trying to achieve. 

 

Answers:

 

1. Unit Testing:  You can find the following article to implement unit testing 

https://www.nexsoftsys.com/articles/unit-test-javascript-in-dynamics-365-using-xrmpage.html

I haven't tried it yet. We do manual testing so far. But we have plans to use Katalon Studio (https://docs.katalon.com/katalon-studio/docs/basic-search-for-dynamic-querying-test-suite.html)  in the future. You can use Xpath to achieve this. Still figuring out and exploring this tool.  

 

2. Source Control: Recently Microsoft has announced CI/CD support Click here .

Also, there are some good articles from Arpit https://arpitmscrmhunt.blogspot.com/2020/05/powerapps-portals-automate-portal.html .  https://arpitmscrmhunt.blogspot.com/2020/11/automate-dynamics-365-power-platform.html. It is one of the ways you can achieve but soon Microsoft will make this option available. 

 

  3. Simultaneous development/development environment:  You can have multiple environments like Dev, Test and Production. Make sure you select your portal type as "Sandbox" while creating environments. And use Portal Configuration Migration utility tool to migrate between environments. Ref: https://docs.microsoft.com/en-us/powerapps/maker/portals/admin/migrate-portal-configuration. Regarding: Simultaneous development - your peer developers can open portal studio simultaneously but I doubt this will work perfectly unless you need to keep pressing sync configuration to merge your code changes asynchronously. There is no power automate trigger yet for "Sync Configuration" 

 

In a nutshell, Microsoft is progressing quickly to bring these brilliant features. There are release waves every six months. 

 


Hope it helps. 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

 

 

View solution in original post

1 REPLY 1
ragavanrajan
Super User
Super User

Hi @AlwaysLearningJ , 

 

  Welcome to the PowerApps Portal forum.  The below answers are based on my personal experience and findings. Hope it will give you some insights into what you are trying to achieve. 

 

Answers:

 

1. Unit Testing:  You can find the following article to implement unit testing 

https://www.nexsoftsys.com/articles/unit-test-javascript-in-dynamics-365-using-xrmpage.html

I haven't tried it yet. We do manual testing so far. But we have plans to use Katalon Studio (https://docs.katalon.com/katalon-studio/docs/basic-search-for-dynamic-querying-test-suite.html)  in the future. You can use Xpath to achieve this. Still figuring out and exploring this tool.  

 

2. Source Control: Recently Microsoft has announced CI/CD support Click here .

Also, there are some good articles from Arpit https://arpitmscrmhunt.blogspot.com/2020/05/powerapps-portals-automate-portal.html .  https://arpitmscrmhunt.blogspot.com/2020/11/automate-dynamics-365-power-platform.html. It is one of the ways you can achieve but soon Microsoft will make this option available. 

 

  3. Simultaneous development/development environment:  You can have multiple environments like Dev, Test and Production. Make sure you select your portal type as "Sandbox" while creating environments. And use Portal Configuration Migration utility tool to migrate between environments. Ref: https://docs.microsoft.com/en-us/powerapps/maker/portals/admin/migrate-portal-configuration. Regarding: Simultaneous development - your peer developers can open portal studio simultaneously but I doubt this will work perfectly unless you need to keep pressing sync configuration to merge your code changes asynchronously. There is no power automate trigger yet for "Sync Configuration" 

 

In a nutshell, Microsoft is progressing quickly to bring these brilliant features. There are release waves every six months. 

 


Hope it helps. 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

 

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Users online (36,724)