-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FunctionalTests -> IntegrationTests; UpstreamFunctionalTests -> Funct…
…ionalTests
- Loading branch information
1 parent
b78befc
commit ccff8a8
Showing
147 changed files
with
64 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
/config.json | ||
/Migrations/*.cs | ||
/scripts/vegeta/results.bin | ||
/.vscode | ||
/Scaffold |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,12 @@ | ||
Functional and Performance Tests | ||
Upstream Functional Tests | ||
================================ | ||
|
||
**Configuring the Database** | ||
|
||
You first must configure your MySql Database. Open the `config.json.example` file, configure the connection string, and save it as `config.json`. | ||
|
||
Next, you must rebuild migrations. Run the `scripts/rebuild.sh` script on Linux or the `scripts/rebuild.ps1` script on Windows. Any time you make changes to database models, run the rebuild script. | ||
|
||
**Running Functional Tests** | ||
|
||
1. Configure the Databse | ||
2. Run `dotnet test` | ||
3. This will run through all of the tests in the Test/ directory. | ||
|
||
**Running Performance Tests** | ||
|
||
1. Configure the Databse | ||
2. Run `dotnet run` | ||
3. This will start a .NET Core MVC API application running on http://localhost:5000 | ||
|
||
Methods: | ||
|
||
`GET /api/async` and `GET /api/sync` return the most recent 10 posts. | ||
|
||
`POST /api/async` and `POST /api/sync` create a new post. The request body should be `Content-Type: application/json` in the form: | ||
|
||
```json | ||
{ | ||
"Title": "Test Blog", | ||
"Posts": [ | ||
{ | ||
"Title": "Post 1", | ||
"Content": "A great blog post" | ||
}, | ||
{ | ||
"Title": "Post 2", | ||
"Content": "An even better blog post" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
The `scripts` directory contains load testing scripts. These scripts require that the [Vegeta](https://github.com/tsenart/vegeta/releases) binary is installed and accessible in your PATH. Here are examples of how to call the load testing scripts: | ||
``` | ||
# by default, runs 50 async queries per second for 5 seconds | ||
./stress.sh # bash for linux | ||
./stress.ps1 # powershell for windows | ||
# runs 100 async queries per second for 10 seconds on linux | ||
./stress.sh 100 10s async | ||
# run 50 sync queries per second for 1 minute on windows | ||
./stress.ps1 50 1m sync | ||
``` | ||
3. This will run through all of the tests in the current directory. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"Data": { | ||
"ConnectionString": "server=127.0.0.1;user id=root;password=Password12!;port=3306;database=pomelo_test;", | ||
"ConnectionString": "server=127.0.0.1;user id=root;password=Password12!;port=3306;", | ||
"ServerVersion": "8.0.0-mysql" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/config.json | ||
/Migrations/*.cs | ||
/scripts/vegeta/results.bin | ||
/.vscode | ||
/Scaffold |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
Functional and Performance Tests | ||
================================ | ||
|
||
**Configuring the Database** | ||
|
||
You first must configure your MySql Database. Open the `config.json.example` file, configure the connection string, and save it as `config.json`. | ||
|
||
Next, you must rebuild migrations. Run the `scripts/rebuild.sh` script on Linux or the `scripts/rebuild.ps1` script on Windows. Any time you make changes to database models, run the rebuild script. | ||
|
||
**Running Functional Tests** | ||
|
||
1. Configure the Databse | ||
2. Run `dotnet test` | ||
3. This will run through all of the tests in the Test/ directory. | ||
|
||
**Running Performance Tests** | ||
|
||
1. Configure the Databse | ||
2. Run `dotnet run` | ||
3. This will start a .NET Core MVC API application running on http://localhost:5000 | ||
|
||
Methods: | ||
|
||
`GET /api/async` and `GET /api/sync` return the most recent 10 posts. | ||
|
||
`POST /api/async` and `POST /api/sync` create a new post. The request body should be `Content-Type: application/json` in the form: | ||
|
||
```json | ||
{ | ||
"Title": "Test Blog", | ||
"Posts": [ | ||
{ | ||
"Title": "Post 1", | ||
"Content": "A great blog post" | ||
}, | ||
{ | ||
"Title": "Post 2", | ||
"Content": "An even better blog post" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
The `scripts` directory contains load testing scripts. These scripts require that the [Vegeta](https://github.com/tsenart/vegeta/releases) binary is installed and accessible in your PATH. Here are examples of how to call the load testing scripts: | ||
``` | ||
# by default, runs 50 async queries per second for 5 seconds | ||
./stress.sh # bash for linux | ||
./stress.ps1 # powershell for windows | ||
# runs 100 async queries per second for 10 seconds on linux | ||
./stress.sh 100 10s async | ||
# run 50 sync queries per second for 1 minute on windows | ||
./stress.ps1 50 1m sync | ||
``` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...streamFunctionalTests/config.json.example → ...ySql.IntegrationTests/config.json.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"Data": { | ||
"ConnectionString": "server=127.0.0.1;user id=root;password=Password12!;port=3306;", | ||
"ConnectionString": "server=127.0.0.1;user id=root;password=Password12!;port=3306;database=pomelo_test;", | ||
"ServerVersion": "8.0.0-mysql" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.