Using Playwright

At the recent dotNetConf 2021, amongst all the other goodies released and presented ( .NET 6 ; VS2022 ), there was a session covering Testing tools for .NET. One in particular caught my eye. Playwright This one merits further investigation. Testing Tools for .NET and cross-platform apps https://playwright.dev/dotnet/

November 17, 2021 · 1 min

Azure SQL performance tuning

After recently migrating an application from on-premises to Azure, I have been keeping a close eye on its performance. The application uses Azure SQL. The Azure portal puts forth recommendations to tune the database e.g. create new indices or drop duplicates. That works well. However I found another SQL query, which provides more recommendations This site ‘Tune your database’ Tune applications and databases for performance in Azure SQL Database and Azure SQL Managed Instance provided some useful guidance. ...

September 30, 2021 · 2 min

PowerShell prompt

Previously I had tried to install oh-my-posh prompts and folder icons. It never quite worked for me and I kept trying to fix it on and off. When Scott Hanselman posted about it (again) in Aug, I had to have a look. However even this time around, I did not get it 100% correct. Could be my profile file was corrupted. I did try a few things ( uninstalling the fonts, recreating my profile ), however things did not improve. ...

September 4, 2021 · 1 min

Automated UI testing

Finally got around to using Playwright - a tool for UI testing. The official documentation is here https://playwright.dev/ . I am using C# and Microsoft has a nuget package. I also wanted to use it in a NUnit project. The two sites that helped me get started were : Testing Web Applications with PlayWright and C# End-To-End Testing With Playwright Sharp Create a new NUnit project in VS2019 (make sure you use .NET 5 and above). Add the Playwright NuGet package. ...

June 12, 2021 · 2 min

Terminal Icons

I have used Scott Hanselman’s tips in the past regarding setting up Windows Terminal and then updating to newer fonts. He recently publised a post about using terminal icons . I think they look great. I had a small hiccup where my icons were not displaying correctly. A search on Stackoverflow got me here How to get @DevBlackOps Terminal-Icons module working in PowerShell on Windows ...

April 17, 2021 · 1 min

Using VS Code for editing and publishing

For a while, I have been using the Windows bash shell to run the blog locally while I edit and then used the bash shell to commit my changes to Github. I’ve now started using VS Code to edit and deploy my blog, all from VS Code. How do I do this? Launch VS Code ( Visual Studio Code) and open up the folder of the blog e.g. D:\RichardBorges.github.io In the terminal window ( in VSCode ) ensure that you have a wsl terminal ( Windows Subsystem for Linux). I’m running Windows 10, i.e. a Windows bash shell. Read more here Type bundle exec jekyll serve in the terminal window and this will build and launch the site locally at http://127.0.0.1:4000. ...

May 27, 2019 · 1 min

Disk cloning software

Macrium Reflect Free Edition to clone an existing disk This helped me immensely, when I added an additional 1TB SSD to my rig.

November 27, 2018 · 1 min

Elasticsearch upgrade

These are my notes on upgrading elasticseach from v5.3 to v6.4.2. This was done on Windows Server 2016 with 32GB RAM and 500GB hdd. The source data was about 300GB in size. Steps Download elasticsearch + kibana from downloads. After extracting to my local drive, I used NSSM to run these as windows services. You should now be able to visit http://localhost:9200 (elasticsearch) and http://localhost:5601 ( kibana ) Copy across the 5.3 data using robcopy. Install elasticsearch 5.3 ( update elasticsearch.yml ) to run 5.3 at http://localhost:8200 ( as 6.4.2 is running on port 9200) Create the new indices on 6.4.2 Migrate the data from 5.3 to 6.4.2 using reindex Additional resources Upgrade Elasticsearch

October 13, 2018 · 1 min

Download binary data to file

I had some binary data in a table in SQL and wanted to save it locally. The data was emails (msg files). I could have done this using powershell and the Invoke-SqlCmd commandlet, but for whatever reason, invoke-sqlcmd refused to work on my machine. After spending a few hours trying to get that to work, I gave up and jumped on stackoverflow to find another solution. Linqpad to the rescue I happened on this link Script to save varbinary data to disk which was just the solution I was looking for. Download LinqPad 5 (the free version is fine) and then ...

April 15, 2018 · 2 min

Setting up CI with TeamCity

I have used an Azure Virtual Machine (Win 2008 Server, standard DS1 1core-3.5GB memory) for this. Download JetBrains TeamCity on the server. I planned to install both the server and the build agent on the one box. This will do for now. I will look at moving the build agent to another server if there is demand. Accepted the default settings during installation. I wanted to connect to bitbucket to retrieve the latest source using SSH. I added a new user (called BuildUser) to Bitbucket and added an SSH public key (bit bucket has good documentation on creating SSH keys. I used my bash shell to create these for the BuildUser user). One gotcha was that the Username had to be ‘git’. ...

August 9, 2016 · 1 min