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.

 

 

 

Helpful resources

Announcements
May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel News & Announcements 768460.png

What's New in the Community?

Check out the latest News & Events in the community!

MPP IDEAS updated 768x460.png

Ideas

Discover ideas and concepts from users like you for how to use Power Pages and take your work to the next level.

Top Solution Authors
Users online (1,114)