An open API service indexing awesome lists of open source software.

https://github.com/lyndychivs/testminer

Test Miner, parsing NUnit Test Reports into a Database for historical record & trend monitoring.
https://github.com/lyndychivs/testminer

database nunit parse record results save test testing

Last synced: 2 months ago
JSON representation

Test Miner, parsing NUnit Test Reports into a Database for historical record & trend monitoring.

Awesome Lists containing this project

README

          

# Test Miner
[![Mutation testing badge](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Flyndychivs%2FTestMiner%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/lyndychivs/TestMiner/master)

## πŸ”­ High Level
Test Miner was designed to parse NUnit3 Test Reports and store the results into a Relational Database.

The Database would provide users with the means to historically track and monitor trends of Test Results.

![Test Miner Diagram](/Resources/TestMinerDiagram.png)

## Prerequisites
| Prerequisite | Note |
| :--- | :--- |
| .NET8 SDK | .NET8 or greater required.
Check current .NET version `dotnet --version`.
Download .NET8 [here](https://dotnet.microsoft.com/en-us/download/dotnet/8.0). |
| SQL Server | The Database template can be found within this repository [here](TestMiner.Database).
Download SQL Server Express [here](https://www.microsoft.com/en-us/sql-server/sql-server-downloads).
You're on the hook to pay for the storage. πŸ˜‚ |
| NUnit3 Test Results | The NUnit3 Test Results must be in XML format.
Use `--result=TestResult.xml;format=nunit3` when executing tests. |

## πŸ–₯️ Test Miner Console Application
Specify the following commands & arguments:

### πŸ› οΈCommand Line Interface Usages
#### ⛏️ mine
Mine Test Report files to the Database.
```bash
mine [parameters]
```
##### Parameters
| Argument | Description | Default | Required |
| :--- | :--- | :--- | :--- |
| `--reports ` | File paths of the NUnit3 Test Report files to upload ("mine") to the Database.
Can specify multiple file paths. | β€” | Yes |
| `--connection ` | The Connection String to the Database. | β€” | No |

###### Example
```bash
TestMiner.exe mine --reports "C:\SampleData\TestResults1.xml" --connection "Server=localhost\\SQLEXPRESS;Database=TestMiner;"
```

#### πŸ’Ύ save
Saves the Database Connection String locally.
```bash
save [parameters]
```
##### Parameters
| Argument | Description | Default | Required |
| :--- | :--- | :--- | :--- |
| `--connection ` | The Connection String to the Database. | β€” | Yes |

###### Example
```bash
TestMiner.exe save --connection "Server=localhost\\SQLEXPRESS;Database=TestMiner;"
```

## πŸ’½ Database
The Database project exists at [TestMiner.Database](TestMiner.Database); you can publish this Database to your own SQL Server instance.

I have included guidance on how to deploy the Database to localhost for testing (with Docker) [here](TestMiner.Database/README.md)

## πŸ–₯️ Test Miner Windows Application
A Windows application exists that wraps all the CLI functionality in a GUI format, [TestMiner.WindowsApplication](TestMiner.WindowsApplication).

![Test Miner Windows Application Screenshot](/TestMiner.WindowsApplication/Screenshots/TestMinerWindowsApplicationDefault.png)

## πŸ§ͺ Testing
- Unit Testing
- [TestMiner.Tests](TestMiner.Tests)
- [TestMiner.Models.Tests](TestMiner.Models.Tests)
- Component Testing
- [TestMiner.Database.ComponentTests](TestMiner.Database.ComponentTests)
- Integration Testing
- [TestMiner.IntegrationTests](TestMiner.IntegrationTests)
- Mutation Testing
- [Strkyer.NET](https://dashboard.stryker-mutator.io/reports/github.com/lyndychivs/TestMiner/master) with [my GitHub Action](https://github.com/lyndychivs/dotnet-stryker-action)