Skip to content

Instantly share code, notes, and snippets.

View gasparnagy's full-sized avatar

Gáspár Nagy gasparnagy

View GitHub Profile

Test Results - Reqnroll.VisualStudio Specs

Expand the following summaries for more details:

Duration: 106.4660198 seconds

| Times | |

@gasparnagy
gasparnagy / download-trx-from-testrun.ps1
Created September 6, 2023 14:15
PowerShell script to re-download published TRX files after VSTest / VsTestForSpecSync task see https://docs.specsolutions.eu/specsync/important-concepts/how-to-publish-test-results-from-pipelines-using-the-vstest-task for details.
[CmdletBinding()]
param (
$outputFolder = "TestResults",
$testRunId = $env:VSTEST_TESTRUNID,
$pat = $env:SYSTEM_ACCESSTOKEN,
$projectUrl = $env:SYSTEM_COLLECTIONURI + $env:SYSTEM_TEAMPROJECT
)
if ($testRunId -eq $null -or $testRunId -eq '') {
Write-Error 'Test Run ID is not specified!' -ErrorAction Stop
@gasparnagy
gasparnagy / exercise.feature
Created July 4, 2023 10:40
Tree in the Forest: Exercise for Agile2023 Scotland, Gaspar Nagy
Feature: Tree in the Forest Exercise
- Work in pairs or 3 people mini-groups
- Find at least one example of the detail types below
- Is that particular detail necessary in the scenario?
Detail types:
1. Entity property
2. Entity existence
3. Hierarchical data
When the user attempts to register with user name {string:userName} and password {string:password}
* Navigate to /Register
* Fill in #UserName with <userName>
* Fill in #Password with <password>
* Fill in #PasswordReEnter with <password>
* Click #RegisterButton
* Remember <userName> as "Registration UserName"

Keybase proof

I hereby claim:

  • I am gasparnagy on github.
  • I am gasparnagy (https://keybase.io/gasparnagy) on keybase.
  • I have a public key ASBiZS7KmX_-ASiCtoIC6f2eHpCby2RrmSbLzucXgHyyrQo

To claim this, I am signing this object:

[Test, Combinatorial]
public void RecognizeParametrizedText_NumberParams(
[Values("When_using_VALUE_as_parameter", "WhenUsingVALUEAsParameter", "WhenUsing_VALUE_AsParameter")] string methodName,
[Values("1", "123", "-123", "12.3", "£123")] string paramText)
{
var sut = CreateSut();
var result = CallCalculateRegexFromMethodAndAssertRegex(sut, StepDefinitionType.When,
CreateBindingMethod(methodName, "value"));
[Test]
public void RecognizeParametrizedText_ParamAtTheEnd()
{
var sut = CreateSut();
var result = CallCalculateRegexFromMethodAndAssertRegex(sut,
StepDefinitionType.Given,
CreateBindingMethod("Given_user_WHO", "who"));
var match = AssertMatches(result, "user 'Joe'");
Scenario: Parameterless steps
Given a scenario 'Simple Scenario' as
"""
When I do something
"""
And the following step definitions
"""
[When]
public void When_I_do_something()
{}
Scenario: Step defintion inheritance
Given foo
Given bar
Given baz
[Binding]
public class CalculatorSteps
{
private readonly ScenarioContext scenarioContext;
public CalculatorSteps(ScenarioContext scenarioContext)
{
this.scenarioContext = scenarioContext;
}