Integrate Momentum Suite Automate with VS Code Extension

momentum suite integrations collaborate with microsoft vs code

A. Introduction

Microsoft VS Code extension allows you to develop automation code faster. It is fully integrated with the interface. There is a two-way, git-based code development system.

B. Configuration

1. Login to Momentum Suite Automate and go to the Settings page.

login to momentum suite automate

2. Under the Integrations tab, click the VS Code icon.

image 3

3. After clicking, a pop-up gives you information about the integration, comes up.

image 4

4. Download the Momentum Suite Visual Studio extension from the VisualStudio marketplace.

5. Click the Install button.

image 5

6. Select the installed Momentum Suite Visual Studio extension.

7. Open Momentum Suite extension Settings. Click the Extension Settings option.

8. Fill in the username/email and password fields. It will be saved automatically.

image 6

C. How to Use

Explained with a simple project on momentumsuite.com (1 Section, 1 Case, 3 Steps)

image 7

A view from the Visual Studio Code project. In this image, you see how things work in the code section.

image 10

C.1. How to Add a New Step

1. Type in the code window “!mstep” and press ENTER on VS Code.

image 11

2. Modify Step title “My Step Title in Freetext“

3. Modify function name Step_ with “Step_my_step_title“

4. Write your code for this step.

5. Save, commit and push your code to Git.

image 12
Please do not modify Id = 0 .. ID value will be populated automatically when you push your code to git repository. After that, You could get/pull the latest code from git to get the generated ID.

C.2. How to Create a New Case on an Existing Section?

1. Press “Command + Shift + P” on VS Code

2. Select “Momentum:Create Case

image 13

3. Select from existing sections that have already been defined before. “Login TestCases”.

image 14

4. Type your Case name. “Successfully Login case”

image 15

5. A new file will be generated on your VS Code project. “Id=0” means that case is new and not pushed yet to your repository.
6. If you want to add a new step type “!mstep“ and write your code.
7. Do not forget to push your code changes to the Git repository.

image 16

C.3. How to Create a New Case on a New Section?

1. Press “Command + Shift + P” on VS Code

2. Select “Momentum:Create Case

image 17

3. Select “Create new Section” to create a new section.

image 18

4. Type your new section name and press enter.

image 19

5. Type your new section description and press enter.

image 20

6. Type your case name. “Signup with the new email address“.

7. A new file will be generated on your VS Code project. “Id=0” means that case is new and not pushed yet to your repository.

8. If you want to add a new step type “!mstep“ and write your code.

9. Do not forget to push your code changes to the Git repository.

image 21

The following image shows Git integration changes.

image 22

The following image shows momentumsuite.com WebUI integration with GitHub changes.

image 23

D. Need to Know

  • Download VS Code for macOS, Windows, or Linux which is your operating system if you don’t have it yet.
  • Open the Visual Studio Code app and search Extensions for your favorite language and framework to debug and run your automation scripts locally.
Table of Contents