Skip to content

Commit 4d88ead

Browse files
committed
chore: Replaced SpecFlow with Reqnroll
1 parent 1f7111f commit 4d88ead

38 files changed

+762
-1122
lines changed

documentation/quality-assurance/1_Test-Approach.md

Lines changed: 50 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Project Background
44

55
### Test Objectives
6+
67
- Confirm that the service performs as per the defined User Needs, outlined during the discovery phase.
78
- Verify that the service meets the business and technical requirements set out by the DfE.
89
- Deliver a quality product by finding defects/bugs so that they can be fixed before delivering the service to the end user.
@@ -11,6 +12,7 @@
1112

1213
The product backlog and project sprints are managed within Azure DevOps using the scrum methodology.
1314
User Stories in DevOps go through the following stages during the development process:
15+
1416
- To Do
1517
- In Development
1618
- In Review
@@ -19,38 +21,41 @@ User Stories in DevOps go through the following stages during the development pr
1921
- Closed
2022

2123
Development of user stories is managed on a sprint board and goes through the following stages:
24+
2225
- Ready
2326
- In Progress
2427
- Complete
2528
- Closed
2629
Each status and Definition of Done act as control 'gates' for all work passing through this process.
2730

2831
### Definition of Done
29-
30-
- Development for the ticket is 'code complete.'
31-
- Work items have been linked (use AB#).
32-
- Your code builds clean without any errors or warnings.
33-
- You have run all unit/integration tests and they pass.
34-
- Your branch has been rebased onto main.
35-
- You have tested by running locally.
36-
- PR raised, reviewed & approved.
37-
- Code squash merged into main.
38-
- The functionality for the ticket has been tested and meets the acceptance criteria.
39-
- Ticket status is updated on Azure DevOps.
40-
- A sign-off is in place from the reporter and Product Owner (need to check if this is the expectation).
32+
33+
- Development for the ticket is 'code complete.'
34+
- Work items have been linked (use AB#).
35+
- Your code builds clean without any errors or warnings.
36+
- You have run all unit/integration tests and they pass.
37+
- Your branch has been rebased onto main.
38+
- You have tested by running locally.
39+
- PR raised, reviewed & approved.
40+
- Code squash merged into main.
41+
- The functionality for the ticket has been tested and meets the acceptance criteria.
42+
- Ticket status is updated on Azure DevOps.
43+
- A sign-off is in place from the reporter and Product Owner (need to check if this is the expectation).
4144

4245
## Test Engineer Roles and Responsibilities
4346

4447
As part of the project, the test engineer will be involved in the following activities:
45-
- Involve in the refinement session - Identify functional and non-functional requirements from the tickets refinement session, add relevant scenarios, review acceptance criteria, and identify test data requirements.
46-
- Review and add automated tests - Write automated feature/e2e tests ahead of/in step with the development of the service, maintain existing feature tests, and review unit and integration tests written by developers.
47-
- Perform manual acceptance testing in Dev environment - Perform manual tests in the Dev environment to ensure that edge case scenarios and other scenarios that cannot be automated are tested.
48-
- Perform ad-hoc exploratory testing in the Test Environment - Perform exploratory testing to ensure that all parts of the service integrate together correctly.
49-
- Contribute to overall quality - Work towards contributing to the overall quality of the systems, process, and deliverables by ensuring each status of the ticket satisfies the pass criteria.
48+
49+
- Involve in the refinement session - Identify functional and non-functional requirements from the tickets refinement session, add relevant scenarios, review acceptance criteria, and identify test data requirements.
50+
- Review and add automated tests - Write automated feature/e2e tests ahead of/in step with the development of the service, maintain existing feature tests, and review unit and integration tests written by developers.
51+
- Perform manual acceptance testing in Dev environment - Perform manual tests in the Dev environment to ensure that edge case scenarios and other scenarios that cannot be automated are tested.
52+
- Perform ad-hoc exploratory testing in the Test Environment - Perform exploratory testing to ensure that all parts of the service integrate together correctly.
53+
- Contribute to overall quality - Work towards contributing to the overall quality of the systems, process, and deliverables by ensuring each status of the ticket satisfies the pass criteria.
5054

5155
## Testing Activities
5256

5357
### Overview
58+
5459
The following diagram shows the Agile Testing Quadrants outlining where each different type of testing sits, its order of implementation, and the associated categories.
5560

5661
![Agile testing quadrants](./images/agile-testing-quadrants.png)
@@ -62,66 +67,78 @@ The testing pyramid below shows the value of implementing different types of aut
6267
### Automated Testing
6368

6469
#### Unit Testing
70+
6571
Unit Tests are developed by writing a test case to cover the requirement without any code supporting it. This test obviously fails. Then, the simplest code is written to pass the test. When another requirement comes along that alters the code, another test is written to satisfy this requirement, and the code is refactored as appropriate.
6672
These tests are the responsibility of developers to write and maintain. Reviews of the unit test coverage by test engineers or other members of the team should be requested as appropriate.
6773

6874
##### Technology Selected
69-
- [Xunit](https://github.com/xunit)
70-
- [AutoFixture](https://github.com/AutoFixture/AutoFixture)
71-
- [FluentAssertion](https://github.com/fluentassertions/fluentassertions)
72-
- [Moq](https://learn.microsoft.com/en-us/shows/visual-studio-toolbox/unit-testing-moq-framework)
75+
76+
- [Xunit](https://github.com/xunit)
77+
- [AutoFixture](https://github.com/AutoFixture/AutoFixture)
78+
- [FluentAssertion](https://github.com/fluentassertions/fluentassertions)
79+
- [Moq](https://learn.microsoft.com/en-us/shows/visual-studio-toolbox/unit-testing-moq-framework)
7380

7481
#### Integration Testing
82+
7583
Integration tests are used to ensure that parts of the code and frameworks work together in the correct way to create a working service. These tests build upon the quality assured during unit testing but are faster and lighter than end-to-end tests, allowing them to be run frequently and earlier in CI.
7684
These tests are the responsibility of the developers to write and maintain in collaboration with the test engineers.
7785

7886
##### Technology Selected
87+
7988
- [Moq](https://learn.microsoft.com/en-us/shows/visual-studio-toolbox/unit-testing-moq-framework)
8089
- [Xunit](https://github.com/xunit)
8190
- [ASP.NET Integration Tests](https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-8.0)
8291
- [AngleSharp](https://github.com/AngleSharp/AngleSharp)
8392
- [AutoFixture](https://github.com/AutoFixture/AutoFixture)
8493

8594
#### Feature/E2E Testing
95+
8696
Feature and end-to-end tests simulate the behavior of an end user. These tests are the responsibility of test engineers to write and maintain in collaboration with developers.
8797

8898
##### Technology Selected
89-
- [Playwright](https://playwright.dev/dotnet)
90-
- [Xunit](https://github.com/xunit)
91-
- [Specflow](https://specflow.org/)
99+
100+
- [Playwright](https://playwright.dev/dotnet)
101+
- [Xunit](https://github.com/xunit)
102+
- [Reqnroll](https://reqnroll.net/)
92103

93104
#### API Testing
105+
94106
API tests are designed to test that the correct responses are received from the API when requests are made to it. These tests are written by collaboration of dev and test engineer.
95107

96108
##### Technology Selected
97-
- [Moq](https://learn.microsoft.com/en-us/shows/visual-studio-toolbox/unit-testing-moq-framework)
98-
- [Xunit](https://github.com/xunit)
99-
- [FluentAssertion](https://github.com/fluentassertions/fluentassertions)
100109

110+
- [Moq](https://learn.microsoft.com/en-us/shows/visual-studio-toolbox/unit-testing-moq-framework)
111+
- [Xunit](https://github.com/xunit)
112+
- [FluentAssertion](https://github.com/fluentassertions/fluentassertions)
101113

102114
#### Accessibility Testing
115+
103116
Automated accessibility testing will be carried out using Deque.axe.playwright library to generate feedback on whether the service meets high-level accessibility requirements in line with WCAG 2.2 AA. This will run as part of the pipeline in the later deployment steps from development to test and production.
104117

105118
#### Technology Selected
106-
- [Deque.axe.playwright](https://github.com/dequelabs/axe-core-nuget/blob/develop/packages/playwright/README.md)
107-
- [FluentAssertion](https://github.com/fluentassertions/fluentassertions)
108-
- [Playwright](https://playwright.dev/)
119+
120+
- [Deque.axe.playwright](https://github.com/dequelabs/axe-core-nuget/blob/develop/packages/playwright/README.md)
121+
- [FluentAssertion](https://github.com/fluentassertions/fluentassertions)
122+
- [Playwright](https://playwright.dev/)
109123

110124
#### UAT Testing**
125+
111126
UAT will be performed before release to ensure the system meets the requirements. This would also give assurance data has been successfully translated into the system.
112127

113128
##### Technology Selected
114129

115130
[will be added later on once we implement it]
116131

117132
#### Performance Testing
133+
118134
Performance testing is used to evaluate how the service is able to cope in terms of its stability, responsiveness, and usability when put under different simulated workloads. We yet have to implement it before going live.
119135

120136
##### Technology Selected
121137

122138
[will be added later on once we implement it]
123139

124140
#### Security Testing
141+
125142
Security scans help identify vulnerabilities and mitigate them that can lead to unauthorized access, data breaches, and theft of sensitive information. Further details can be found [here.](./3_Security-Testing.md)
126143

127144
### Manual Testing
@@ -141,7 +158,8 @@ This testing is carried out by test engineer(s) and/or developers when it is dee
141158
### Testing Requirements
142159

143160
#### Supported Browsers
144-
We will be focusing on Chrome browser on Windows and macOS and Edge on windows considering the insights we have from the previous system. The rest of the browsers shown below will be checked on adhoc basis.
161+
162+
We will be focusing on Chrome browser on Windows and macOS and Edge on windows considering the insights we have from the previous system. The rest of the browsers shown below will be checked on adhoc basis.
145163

146164
| Operating System | Browser | Versions |
147165
|------------------|------------------------------|------------------------------|
@@ -157,6 +175,7 @@ We will be focusing on Chrome browser on Windows and macOS and Edge on windows c
157175
| | Samsung Internet | Latest |
158176

159177
Any issues or discrepancies between browsers will be raised as defects and then assessed for priority and severity.
178+
160179
#### Environments
161180

162181
| Env Prefix | Env Name | Testing |

platform/Directory.Packages.props

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<PackageVersion Include="Dapper.Contrib" Version="2.0.78"/>
1818
<PackageVersion Include="Dapper.SqlBuilder" Version="2.0.78"/>
1919
<PackageVersion Include="dbup-sqlserver" Version="5.0.40"/>
20+
<PackageVersion Include="Dynamitey" Version="3.0.3"/>
2021
<PackageVersion Include="FluentAssertions" Version="6.12.1"/>
2122
<PackageVersion Include="FluentValidation" Version="11.10.0"/>
2223
<PackageVersion Include="JsonSubTypes" Version="2.0.1"/>
@@ -48,10 +49,8 @@
4849
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
4950
<PackageVersion Include="Moq" Version="4.20.72"/>
5051
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3"/>
51-
<PackageVersion Include="SpecFlow" Version="3.9.74"/>
52-
<PackageVersion Include="SpecFlow.Assist.Dynamic" Version="1.4.2"/>
53-
<PackageVersion Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.57"/>
54-
<PackageVersion Include="SpecFlow.xUnit" Version="3.9.74"/>
52+
<PackageVersion Include="Reqnroll" Version="2.1.0"/>
53+
<PackageVersion Include="Reqnroll.xUnit" Version="2.1.0"/>
5554
<PackageVersion Include="System.Linq.Async" Version="6.0.1"/>
5655
<PackageVersion Include="System.Text.Json" Version="8.0.4"/>
5756
<PackageVersion Include="xunit" Version="2.9.0"/>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace Platform.ApiTests.Assist;
2+
3+
public class DynamicInstanceComparisonException(IList<string> diffs) : Exception("There were some difference between the table and the instance")
4+
{
5+
public IList<string> Differences { get; private set; } = diffs;
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
namespace Platform.ApiTests.Assist;
2+
3+
public class DynamicInstanceFromTableException(string message) : Exception(message);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace Platform.ApiTests.Assist;
2+
3+
public class DynamicSetComparisonException(string message) : Exception(message)
4+
{
5+
public DynamicSetComparisonException(string message, IList<string> differences) : this(message)
6+
{
7+
Differences = differences;
8+
}
9+
10+
public IList<string> Differences { get; private set; } = new List<string>();
11+
}

0 commit comments

Comments
 (0)