Wednesday, 31 July 2024

Low Code testing with Playwright - 1. Intro Exercise (15 min)

Exercise 1.  Install and setup you first Playwright Test

1. Verify VS Code is installed 
2. Ensure the Microsoft Playwright Extension is installed (use the default language TypeScript)
 
3. Create a folder using Windows Explorer as shown here: C:\Users\paulb\source\repos\Playwright\Mendix

4. Open the folder in VS Code and ensure the project is initialised C:\Users\paulb\source\repos\Playwright\Mendix> npm init playwright@latest --yes -- --quiet --browser=chromium --browser=webkit

5. Verify your screen looks similar to this...




Exercise 2.  Record and run your first Playwright test

1. On the "Testing" area, select "Record new"


2. The recorder opens, type in a url in my case I used "https://www.paulbeck.co.uk"


3. Click and assert text exists on the page

4. Stop the recorder and close the browser.

5. Run the test, as shown below, validate the result

Sunday, 21 July 2024

Simple comparison of Cloud Storage options

Azure offers 3 main options for storing files:

Azure File Store (Supports SMB, no version control)

Azure Blob Storage (No SMB, has version control via apis, tiers for archiving)

Azure Data Lake Storage -Gen2 (No SMB, no versioning), more relevant to Big data/DataLake

 

AWS also has options to consider:


Amazon Simple Storage Service (S3), similar to Azure Blob Storage with an API and tiers

Amazon FSx, similar to Azure File Store, supports SMB and NFS

Amazon Elastic Block Store (ESB) supports NFS


Office 365/SharePoint Archive option:

https://adoption.microsoft.com/en-gb/microsoft-365-archive/

Extra SPO/O365 storage costs about $0.20/GB per month, using the SP Achieve service cost 0.05$/TB per month.  Also you only get changed for what you use, no pre-provisioned size.  Security & compliance is maintained so for old data needed to be archive this is a great easy option.

Sunday, 7 July 2024

PowerAutomate Flow to populate a word document table with Dynamic Rows

Overview: I recently needed to generate a dynamic table within word using Power automate, there are lots of resources out there to do it.  I found the order I did the core steps in determines if the process works so thought I'd blog this as a reminder and simple guide.

Objective: Use a flow to build an dynamic array and display the output within a Word document.

Steps

1. Create a new Flow in Power Automate (here I am initialising an array but you can build this up as you need too.  The Select option and nested actions allow for creating most required data sets)


2. Create a Word document for the template (in my scenario, I've created the MS word document inside a SharePoint Document library, as shown below)

3. Edit the word Document to Display the dynamic Rows (you need to edit in the Word app not the browser version of word).  
  • Add/Insert a Table (mine needs three columns)

  • Ensure you have the "Developer" ribbon setup and give the focus to the position where the fist dynamic field is needed.

  • Insert the "Plain Text Content Control" within the table at the desire places
  • Add the "key" name from the array to each plain text control as shown below:


  • The word document should looks as shown below.  Save and close the docx file.



Sunday, 2 June 2024

AAD/EntraID with Power Platform and SharePoint Guideance

Overview

Keeping a clean hierarchical Active Directory (AD) is essential to managing permissions and having good governance in the Power Platform. This post outlines the key core concepts of securing your platforms.

Power Platform is managed at three levels:

  1. App (model, canvas or power pages),
  2. Environment (user needs permissions to the tenant environment)
  3. Source (Dataverse, SQL, SharePoint)
AAD/EntraId
Azure Active Directory (AAD) is the backbone of permissions in the Power Platform. Security groups are normally well set up within AD, but when creating a new group, I tend to use "Microsoft 365"groups to handle permissions.

The process is to add users to Groups (Security or Microsoft 365) and then give permissions using the group.  Security groups can be managed dynamically i.e. if you are in a division you automatically belong to a security group. Or Security groups allow for users to be added individually (there is also a bulk upload).

This keeps management simple, as the Microsoft groups and Security groups can be reused to grant various apps and reports permissions.

Tip: You cannot use distribution groups to assign rights to SharePoint or Power Platform.

Wednesday, 29 May 2024

Mendix tips & thoughts

Mendix Charting/dashboarding options:

  • E-Charts (Community supported) are simple and nice,
  • Anycharts (very common),

Grafana can be integrated, but I haven't tried it with Mendix.

Power BI can show reports using an iFrame widget.  I like this approach.

Module/Widget Support Note: Check whether libraries are supported by Mendix/Platform or Partner.

Community-supported obviously can be changed by the community. Partner-supported is also an option if you have an agreement with the partner or trust them.

Performance Testing Tool options:

A colleague has used JMeter and feels it was not ideal. 

I'm considering using the Microsoft Playwright Testing service and Playwright testing.

Enterprise Logging/SIEM SaaS integrations supported by Mendix:

  1. App Dynamics.
  2. Datadog,
  3. New Relic,
  4. Dynatrace, and
  5. Splunk

Watch out for:

Logging
Each system logs to loc files on the local machine; these can be pushed into the Postgres local instance.  This can result in a massive storage load being added for auditing and logging.  

Monitoring
Logs can be shipped out using backup and restored or by calling the REST Open API.

Maintenance
Mendix builds a database per app per environment, so the recommendation is to use at least 3 per app as you need dev, Test, and Prod. Each instance, by default, uses PostgreSQL (you can only use PostgreSQL if you use the Mendix-provided images deployed on AWS).  

Global Variables
Mendix doesn't have a concept of a global variable at the start or per session. You can load lookup data, which is often held centrally in your enterprise. This can get heavy quickly, but you can copy Open API results into the local PostgreSQL database so it only gets local data.  

Costs
With Mendix, the cost can escalate rather quickly. Reduce cost by scaling back to the most minor instance in dev and test, especially post-go-live. Each app has a separate database, so management and connectivity can become hard to control. 

Performance
Number of Controls & Size of each application.



Wednesday, 22 May 2024

Weird behaviour on App Onstart for collection creating when the 'Delay Load' preview feature is enabled

Problem: We recently had a few canvas apps start behaving strangely where our menu which used a SharePoint list to populate a collection on the App onStart() was not working on all pages with the exception of the Home page.  This only happened to the published applications, in edit and play mode, it worked perfectly.

Initial Hypothesis: Looking at the logs between the "edit and play" and the "Publish" was showing hundreds to transactions saying something along the lines of "text is blank and therefore will be zero".  When I set the start page to a different page and run the "Published " app, the first page works but not the other pages navigation.  Looking at the difference in the logs, it appears that the collection is seen as empty on subsequent page loads only when running in "Published" mode.

Resolution: I don't remember turning the "delay load" feature on, it only showed up on the 22 May 2024 (or at least we noticed it), I merely turn off the feature and all the affected applications started working again.

Thoughts: The behavior bug must have been caused by either upgrade in Canvas App platform version, or the feature being automatically turn on.  If you get an issue, turn off the experimental feature.


MS Build Conference 2024 Online Notes

A slick keynote, but I'm summarising the items i liked from the online sessions I watched: