Skip to main content

Posts

Showing posts from January, 2024

What is Azure DevOps Extension in Azure CLI and How to install?

  Azure DevOps Extension in Azure CLI expands the capabilities of the Azure CLI to interact with Azure DevOps services. It provides commands for managing work items, pipelines, repositories, test plans, and other DevOps resources directly from the command line. Here are the general steps to install the Azure DevOps CLI extension: Prerequisites : 1.        >  Azure CLI: Make sure you have the Azure CLI installed on your machine. You can download it from the official Azure CLI website: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli Steps to Install Azure DevOps CLI Extension: 1. Open a Command Prompt or Terminal:            Open your command-line interface. This could be a Command Prompt on Windows, a Terminal on macOS/Linux, or Azure Cloud Shell.       2. Install the Azure DevOps Extension:             Run the following command to install the Azure DevOp...

ScenarioContext.Current vs Context Injection in Specflow

Within ScenarioContext in SpecFlow, there are two distinct ways to share data between steps in a scenario: context injection and current injection. Both approaches accomplish the same goal, but they are implemented differently. ScenarioContext.Current: A static attribute of the ScenarioContext class in SpecFlow is called ScenarioContext.Current. It offers a method for storing and retrieving data from various steps in the same scenario. By putting values in the scenario context during one step and retrieving them in another, you can use ScenarioContext.Current to communicate data between steps. Example: While ScenarioContext.Current is convenient, it has some drawbacks, such as being static and potentially leading to difficulties with running scenarios in parallel . Therefore, w ith SpecFlow 3.0, ScenarioContext.Current is marked obsolete.     Context Injection: Context injection allows you to use the step class's constructor to directly inject the scenario ...