avatarEthan O'Brien

Summary

The Create GUID extension for Visual Studio Code streamlines the process of generating unique identifiers for use in software testing.

Abstract

The article introduces the Create GUID extension for Visual Studio Code, developed by nwallace, as a solution for developers who need to generate static GUIDs for test data. This extension is particularly useful when a consistent GUID is required across multiple tests to reference the same data record. Once installed, the extension allows users to quickly generate a GUID via a keyboard shortcut (shift — command-p), utilizing the node-uuid package and copying the generated GUID to the clipboard with the help of the copy-paste package. This tool enhances efficiency by eliminating the need for alternative methods such as command line tools, online GUID generators, or reusing GUIDs from existing records.

Opinions

  • The author suggests that generating a GUID through traditional methods like command line tools or online generators can be less efficient than using the Create GUID extension.
  • The extension is praised for its convenience, as it simplifies the process of generating and using GUIDs in test data, thus improving the workflow for developers.
  • The author implies that the Create GUID extension is an underrated tool within the VS Code marketplace, indicating that it may not be as widely known or utilized as it could be.
  • The use of static GUIDs for testing is emphasized as important for consistency when retrieving records across multiple tests.

An underrated VS Code extension? Create Guid

Create GUID in the VS Code Marketplace

When creating tests you may have found yourself in the situation that you need to generate a quick GUID to drop into some mocked data. It can’t be a dynamic GUID in this situation since you want to be able to retrieve that record again across multiple tests. I’ve used a couple of different methods to just simply get a new GUID, the command line, some random GUID generator websites or even stealing a GUID off of another record.

Here we have Create GUID by nwallace

After enabling this extension in VS Code, you can quickly run the Create GUID command by using the shortcut shift — command-p. This will generate a GUID using the node-uuid package and then conveniently add it to your clipboard using the copy-paste package.

Now you’re on your way to completing your test and on to the next feature… or defect :).

For more information about me, visit obrienwritescode.com.

Vscode
Vscode Extension
Testing
Development
Recommended from ReadMedium