Skip to content

Added MSTest workflow #12

Added MSTest workflow

Added MSTest workflow #12

GitHub Actions / SpecFlow Test Summary (MsTest 6.0) failed Apr 8, 2024 in 0s

SpecFlow Test Summary (MsTest 6.0)

Details

My.Test.Library.MsTest.Unit.Tests

%%{
	init: {
		'theme': 'base',
		'themeVariables': {
			'primaryTextColor': '#fff',
			'pieStrokeColor': '#8888',
			'pieOuterStrokeColor': '#8888',
			'pie1': '#f03a1788',
			'pie2': '#fff8',
			'pie3': '#16c60c88'
		}
	}
}%%
pie title Features
	"Fail": 1
	"Other": 1
	"Pass": 0
Loading
%%{
	init: {
		'theme': 'base',
		'themeVariables': {
			'primaryTextColor': '#fff',
			'pieStrokeColor': '#8888',
			'pieOuterStrokeColor': '#8888',
			'pie1': '#16c60c88',
			'pie2': '#fff8',
			'pie3': '#f03a1788'
		}
	}
}%%
pie title Scenarios
	"Pass": 13
	"Other": 3
	"Fail": 1
Loading
%%{
	init: {
		'theme': 'base',
		'themeVariables': {
			'primaryTextColor': '#fff',
			'pieStrokeColor': '#8888',
			'pieOuterStrokeColor': '#8888',
			'pie1': '#16c60c88',
			'pie2': '#fff8',
			'pie3': '#f03a1788'
		}
	}
}%%
pie title Steps
	"Pass": 93
	"Other": 8
	"Fail": 1
Loading
%%{
	init: {
		'theme': 'base',
		'themeVariables': {
			'xyChart': {
				'titleColor': "#fff",
				'xAxisLabelColor': "#fff",
				'xAxisTitleColor': "#fff",
				'xAxisTickColor': "#fff",
				'xAxisLineColor': "#fff",
				'yAxisLabelColor': "#fff",
				'yAxisTitleColor': "#fff",
				'yAxisTickColor': "#fff",
				'yAxisLineColor': "#fff",
				'backgroundColor': "#0000",
				'plotColorPalette': "#622116, #676a6d, #105512"
			}
		}
	}
}%%
xychart-beta
title Tags
x-axis [event, happyPath, tickets, validation]
y-axis "Tests"
bar [2, 1, 6, 3]
bar [1, 1, 5, 3]
bar [0, 0, 0, 0]
Loading
Feature Scenario Case Passed Failed Skipped Time
Feature: BookingService 5 ✔️ 0 1 ➖ 0.23s
Scenario: Invalid request 🟢 0s
Scenario: Event cancelled 🟢 0s
Scenario: No tickets left 🟢 0s
Scenario: Some tickets left 🟢 0s
Scenario: Tickets purchased 🟢 0s
Scenario: An inconclusive test 0.22s
Feature: RequestValidator 8 ✔️ 1 ❌ 2 ➖ 0.01s
Scenario: Invalid booking name 🟢 0s
Scenario: Invalid tickets requested 🟢 0s
Scenario: Various request scenarios
Case #1
first_name: John
last_name: Smith
number_of_tickets: 10
unused_variable_1: 12
unused_variable_2: 1
🟢 0s
Case #2
first_name: Paul
last_name: Jones
number_of_tickets: 15
unused_variable_1: 13
unused_variable_2: 1
🟢 0s
Case #3
first_name: Mary
last_name: Sue
number_of_tickets: 1
unused_variable_1: 14
unused_variable_2: 1
🔴 0s
Case #4
first_name: Alex
last_name: McCain
number_of_tickets: 1
unused_variable_1: 15
unused_variable_2: 1
🟢 0s
Case #5
first_name: Mary
last_name: Jones
number_of_tickets: 100
unused_variable_1: 43
unused_variable_2: 1
🟢 0s
Case #6
first_name: The
last_name: Emperor
number_of_tickets: 1
unused_variable_1: 42
unused_variable_2: 1
0.01s
Case #7
first_name: Cole
last_name: Stevens
number_of_tickets: 42
unused_variable_1: 41
unused_variable_2: 1
🟢 0s
Case #8
first_name: Jack
last_name: Smith
number_of_tickets: 5
unused_variable_1: 40
unused_variable_2: 1
🟢 0s
Scenario: An inconclusive test 0s

Feature: BookingService

Basic booking service that takes a booking request, validates it for correctness, and then attempts to secure the number of tickets against the registered event.

✔️ Scenario: Invalid request

🏷️ @Validation

Background: an invalid response is returned from the (mocked) request validator interface

🟢Given the request has a validation failure of "Something failed validation"0s
🟢When the booking request is made0s
🟢Then the booking request should fail0s
🟢And the response message should be "Error - Something failed validation"0s

✔️ Scenario: Event cancelled

🏷️ @event, @tickets

🟢Given the request is valid0s
🟢And the request asks for 2 tickets0s
🟢And the requested event is "Cancelled"0s
🟢When the booking request is made0s
🟢Then the booking request should fail0s
🟢And the response message should be "Error - Event is cancelled"0s

✔️ Scenario: No tickets left

🏷️ @tickets

🟢Given the request is valid0s
🟢And the request asks for 2 tickets0s
🟢And the requested event has 0 tickets left0s
🟢When the booking request is made0s
🟢Then the booking request should fail0s
🟢And the response message should be "Error - Event is fully booked"0s

✔️ Scenario: Some tickets left

🏷️ @tickets

🟢Given the request is valid0s
🟢And the request asks for 20 tickets0s
🟢And the requested event has 10 tickets left0s
🟢When the booking request is made0s
🟢Then the booking request should succeed0s
🟢And the response should indicate 10 tickets were purchased0s
🟢And the response message should be "Partial Success - 10 tickets were purchased"0s

✔️ Scenario: Tickets purchased

🏷️ @happypath, @tickets

🟢Given the request is valid0s
🟢And the request asks for 5 tickets0s
🟢And the requested event has 10 tickets left0s
🟢When the booking request is made0s
🟢Then the booking request should succeed0s
🟢And the response should indicate 5 tickets were purchased0s
🟢And the response message should be "Success - 5 tickets were purchased"0s

Scenario: An inconclusive test

🏷️ @event

🟢Given the request is valid0.21s
🟢When the booking request is made0.01s
Then the booking test should be inconclusive0s

Feature: RequestValidator

This is feature text which supports markdown
You can find some additional SpecFlow markdown documentation here
Image

✔️ Scenario: Invalid booking name

🏷️ @Validation

🟢Given a request has been created0s
🟢And the request has an invalid first name0s
🟢When the validation request is made0s
🟢Then the validation request should fail0s
🟢And the error message should be "Please supply a valid first name"0s

✔️ Scenario: Invalid tickets requested

🏷️ @tickets, @Validation

🟢Given a request has been created0s
🟢And the request contains 0 tickets0s
🟢When the validation request is made0s
🟢Then the validation request should fail0s
🟢And the error message should be "Please specify a number of tickets greater than zero"0s

Scenario: Various request scenarios

✔️ Case #1

first_name: John
last_name: Smith
number_of_tickets: 10
unused_variable_1: 12
unused_variable_2: 1
🟢Given a request has been created0s
🟢And the first name is set to <first_name> with neither <unused_variable_1> nor <unused_variable_2> being used0s
🟢And the last name is set to <last_name>0s
🟢And the tickets requested are set to <number_of_tickets>0s
🟢When the validation request is made0s
🟢Then the validation request should succeed0s
🟢And there should be no error message0s

✔️ Case #2

first_name: Paul
last_name: Jones
number_of_tickets: 15
unused_variable_1: 13
unused_variable_2: 1
🟢Given a request has been created0s
🟢And the first name is set to <first_name> with neither <unused_variable_1> nor <unused_variable_2> being used0s
🟢And the last name is set to <last_name>0s
🟢And the tickets requested are set to <number_of_tickets>0s
🟢When the validation request is made0s
🟢Then the validation request should succeed0s
🟢And there should be no error message0s

Case #3

first_name: Mary
last_name: Sue
number_of_tickets: 1
unused_variable_1: 14
unused_variable_2: 1
🟢Given a request has been created0s
🟢And the first name is set to <first_name> with neither <unused_variable_1> nor <unused_variable_2> being used0s
🟢And the last name is set to <last_name>0s
🟢And the tickets requested are set to <number_of_tickets>0s
🟢When the validation request is made0s
🔴Then the validation request should succeed0s
Error Details Assert.True() Failure Expected: True Actual: False
And there should be no error message0s
Error Details Assert.True() Failure Expected: True Actual: False

✔️ Case #4

first_name: Alex
last_name: McCain
number_of_tickets: 1
unused_variable_1: 15
unused_variable_2: 1
🟢Given a request has been created0s
🟢And the first name is set to <first_name> with neither <unused_variable_1> nor <unused_variable_2> being used0s
🟢And the last name is set to <last_name>0s
🟢And the tickets requested are set to <number_of_tickets>0s
🟢When the validation request is made0s
🟢Then the validation request should succeed0s
🟢And there should be no error message0s

✔️ Case #5

first_name: Mary
last_name: Jones
number_of_tickets: 100
unused_variable_1: 43
unused_variable_2: 1
🟢Given a request has been created0s
🟢And the first name is set to <first_name> with neither <unused_variable_1> nor <unused_variable_2> being used0s
🟢And the last name is set to <last_name>0s
🟢And the tickets requested are set to <number_of_tickets>0s
🟢When the validation request is made0s
🟢Then the validation request should succeed0s
🟢And there should be no error message0s

Case #6

first_name: The
last_name: Emperor
number_of_tickets: 1
unused_variable_1: 42
unused_variable_2: 1
🟢Given a request has been created0s
🟢And the first name is set to <first_name> with neither <unused_variable_1> nor <unused_variable_2> being used0s
And the last name is set to <last_name>0.01s
And the tickets requested are set to <number_of_tickets>0s
When the validation request is made0s
Then the validation request should succeed0s
And there should be no error message0s

✔️ Case #7

first_name: Cole
last_name: Stevens
number_of_tickets: 42
unused_variable_1: 41
unused_variable_2: 1
🟢Given a request has been created0s
🟢And the first name is set to <first_name> with neither <unused_variable_1> nor <unused_variable_2> being used0s
🟢And the last name is set to <last_name>0s
🟢And the tickets requested are set to <number_of_tickets>0s
🟢When the validation request is made0s
🟢Then the validation request should succeed0s
🟢And there should be no error message0s

✔️ Case #8

first_name: Jack
last_name: Smith
number_of_tickets: 5
unused_variable_1: 40
unused_variable_2: 1
🟢Given a request has been created0s
🟢And the first name is set to <first_name> with neither <unused_variable_1> nor <unused_variable_2> being used0s
🟢And the last name is set to <last_name>0s
🟢And the tickets requested are set to <number_of_tickets>0s
🟢When the validation request is made0s
🟢Then the validation request should succeed0s
🟢And there should be no error message0s

Scenario: An inconclusive test

🏷️ @tickets

🟢Given a request has been created0s
🟢When the validation request is made0s
Then the validation test should be inconclusive0s