Endjin - Home

Day 1: PowerShell, BDD and Git

by Mike Larah

 

So the first real work started yesterday afternoon with an introduction to PowerShell. Since all new employees are required to sign up to variety of web services (Office 365, YouTrack, GitHub, WordPress, TeamCity, IPCop), it would save time to write a script to automate this on-boarding process.

Starting with YouTrack, by using the web service’s REST APIs we can find the required parameters to pass forward for logging in and creating a new user.

image

Using endjin’s ‘work smarter’ mantra, the PowerShell script that was then written was adapted from similar work that was done combining TeamCity and PowerShell, which is outlined in an earlier post by Howard.

To test the script, I was shown some BDD in the form of the Pester testing framework for PowerShell and set up tests for all the methods used (example below).

image

Finally, to save my hard afternoon’s work I learnt how to use Git and set up a repository on GitHub. Firstly I used the command line based Git Bash to get an appreciation for what was going on and then SmartGit, which is a much sleeker GUI solution.

About the author

Mike is a Software Engineer at endjin with 5 years of experience in solving technology problems for clients. He is a certified Microsoft Cloud Platform developer, and has experience building solutions utilizing much of the Azure ecosystem.