Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bfee59a
Remove view-related logic
OleksPal Mar 28, 2025
be05640
Remove view-related logic from the WebApplicationSimulator
OleksPal Mar 28, 2025
71fff64
Add Swagger UI parameters
OleksPal Mar 28, 2025
5974d65
Remove the UseStaticFiles middleware
OleksPal Mar 31, 2025
cfb077b
Remove old Grpc projects
OleksPal Mar 31, 2025
c8522d4
Replace the WebAppSimulator with the HttpApiSimulator Web API
OleksPal Mar 31, 2025
1215b55
Move WebSockets logic to another project
OleksPal Mar 31, 2025
a574da0
Remove folder name from appsettings and set to ignored sqlite databas…
OleksPal Mar 31, 2025
59b977c
Remove folder name from the connection string
OleksPal Mar 31, 2025
0dc5fe8
Add the UserDto class
OleksPal Mar 31, 2025
1ca0e61
Fix Post action to return id of added user
OleksPal Mar 31, 2025
fccd79d
Update the Put action to use the UserDto
OleksPal Mar 31, 2025
782e42b
Remove the Post action and replace its functionality in the Put action
OleksPal Apr 1, 2025
1593064
Fix methods of the Redis repository
OleksPal Apr 1, 2025
5c94628
Merge branch 'dev' into change-type-of-simulators-to-web-api
OleksPal Apr 2, 2025
35f2e85
fix docker container
AntyaDev Apr 2, 2025
b4f1d70
Change the BookstoreSimulator project type to Web API
OleksPal Apr 2, 2025
0910e9f
Change logic to decrement not only one book when ordering it
OleksPal Apr 3, 2025
b65c048
Update test` ports and change the availableOnly parameter to false
OleksPal Apr 3, 2025
0bc31ce
Refactoring
OleksPal Apr 4, 2025
ad73c02
Change using Http.Send method to use it with generic types
OleksPal Apr 5, 2025
90f6b45
Remove JsonPropertyNames attributes and update the NBomber.Http
OleksPal Apr 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,6 @@ ASALocalRun/
!/src/NBomber/DomainServices/Reports
/examples/CSharpProd/DB/Redis/redis-data/
/examples/WebAppSimulator/DB
/examples/HttpApiSimulator/UsersDB.db
/examples/HttpApiSimulator/UsersDB.db-shm
/examples/HttpApiSimulator/UsersDB.db-wal
75 changes: 45 additions & 30 deletions NBomber.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo", "examples\Demo\Demo.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitExample", "examples\xUnitExample\xUnitExample.csproj", "{062DD1FF-B466-4F40-BE1F-8D85EA3BDB6A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebAppSimulator", "examples\WebAppSimulator\WebAppSimulator.csproj", "{37D936ED-619C-47F8-95BD-63B966590A15}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookstoreSimulator", "examples\BookstoreSimulator\BookstoreSimulator.csproj", "{9BC9E01E-C12A-45D6-9910-B0642F36338B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "simulators", "simulators", "{B20C9B19-52F5-4AF1-B41D-D01294BEC6C9}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "NBomber", "src\NBomber\NBomber.fsproj", "{53904BB5-68B2-497A-93BD-46423FBD239C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HttpApiSimulator", "examples\HttpApiSimulator\HttpApiSimulator.csproj", "{5CAFBC11-105D-4542-B8CF-D235249E3BCA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebSocketsSimulator", "examples\WebSocketsSimulator\WebSocketsSimulator.csproj", "{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrpcServerSimulator", "examples\GrpcServerSimulator\GrpcServerSimulator.csproj", "{D4E6343A-1042-CDB6-308D-6C1662607E77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrpcClient", "examples\GrpcClient\GrpcClient.csproj", "{EBBD9F26-59E7-0C55-0059-93AD3EB3469A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookstoreSimulator", "examples\BookstoreSimulator\BookstoreSimulator.csproj", "{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -55,30 +57,6 @@ Global
{062DD1FF-B466-4F40-BE1F-8D85EA3BDB6A}.Release|x64.Build.0 = Release|Any CPU
{062DD1FF-B466-4F40-BE1F-8D85EA3BDB6A}.Release|x86.ActiveCfg = Release|Any CPU
{062DD1FF-B466-4F40-BE1F-8D85EA3BDB6A}.Release|x86.Build.0 = Release|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Debug|Any CPU.Build.0 = Debug|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Debug|x64.ActiveCfg = Debug|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Debug|x64.Build.0 = Debug|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Debug|x86.ActiveCfg = Debug|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Debug|x86.Build.0 = Debug|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Release|Any CPU.ActiveCfg = Release|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Release|Any CPU.Build.0 = Release|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Release|x64.ActiveCfg = Release|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Release|x64.Build.0 = Release|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Release|x86.ActiveCfg = Release|Any CPU
{37D936ED-619C-47F8-95BD-63B966590A15}.Release|x86.Build.0 = Release|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Debug|x64.ActiveCfg = Debug|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Debug|x64.Build.0 = Debug|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Debug|x86.ActiveCfg = Debug|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Debug|x86.Build.0 = Debug|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Release|Any CPU.Build.0 = Release|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Release|x64.ActiveCfg = Release|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Release|x64.Build.0 = Release|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Release|x86.ActiveCfg = Release|Any CPU
{9BC9E01E-C12A-45D6-9910-B0642F36338B}.Release|x86.Build.0 = Release|Any CPU
{53904BB5-68B2-497A-93BD-46423FBD239C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53904BB5-68B2-497A-93BD-46423FBD239C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53904BB5-68B2-497A-93BD-46423FBD239C}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -91,6 +69,30 @@ Global
{53904BB5-68B2-497A-93BD-46423FBD239C}.Release|x64.Build.0 = Release|Any CPU
{53904BB5-68B2-497A-93BD-46423FBD239C}.Release|x86.ActiveCfg = Release|Any CPU
{53904BB5-68B2-497A-93BD-46423FBD239C}.Release|x86.Build.0 = Release|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Debug|x64.ActiveCfg = Debug|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Debug|x64.Build.0 = Debug|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Debug|x86.ActiveCfg = Debug|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Debug|x86.Build.0 = Debug|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Release|Any CPU.Build.0 = Release|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Release|x64.ActiveCfg = Release|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Release|x64.Build.0 = Release|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Release|x86.ActiveCfg = Release|Any CPU
{5CAFBC11-105D-4542-B8CF-D235249E3BCA}.Release|x86.Build.0 = Release|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Debug|x64.ActiveCfg = Debug|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Debug|x64.Build.0 = Debug|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Debug|x86.ActiveCfg = Debug|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Debug|x86.Build.0 = Debug|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Release|Any CPU.Build.0 = Release|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Release|x64.ActiveCfg = Release|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Release|x64.Build.0 = Release|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Release|x86.ActiveCfg = Release|Any CPU
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A}.Release|x86.Build.0 = Release|Any CPU
{D4E6343A-1042-CDB6-308D-6C1662607E77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D4E6343A-1042-CDB6-308D-6C1662607E77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4E6343A-1042-CDB6-308D-6C1662607E77}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -115,18 +117,31 @@ Global
{EBBD9F26-59E7-0C55-0059-93AD3EB3469A}.Release|x64.Build.0 = Release|Any CPU
{EBBD9F26-59E7-0C55-0059-93AD3EB3469A}.Release|x86.ActiveCfg = Release|Any CPU
{EBBD9F26-59E7-0C55-0059-93AD3EB3469A}.Release|x86.Build.0 = Release|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Debug|x64.ActiveCfg = Debug|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Debug|x64.Build.0 = Debug|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Debug|x86.ActiveCfg = Debug|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Debug|x86.Build.0 = Debug|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Release|Any CPU.Build.0 = Release|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Release|x64.ActiveCfg = Release|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Release|x64.Build.0 = Release|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Release|x86.ActiveCfg = Release|Any CPU
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{657861BD-19DA-4B93-937D-88B5C25E6D87} = {10398A75-959D-4271-913A-BE99E4ED5744}
{062DD1FF-B466-4F40-BE1F-8D85EA3BDB6A} = {10398A75-959D-4271-913A-BE99E4ED5744}
{37D936ED-619C-47F8-95BD-63B966590A15} = {B20C9B19-52F5-4AF1-B41D-D01294BEC6C9}
{9BC9E01E-C12A-45D6-9910-B0642F36338B} = {B20C9B19-52F5-4AF1-B41D-D01294BEC6C9}
{B20C9B19-52F5-4AF1-B41D-D01294BEC6C9} = {10398A75-959D-4271-913A-BE99E4ED5744}
{5CAFBC11-105D-4542-B8CF-D235249E3BCA} = {B20C9B19-52F5-4AF1-B41D-D01294BEC6C9}
{C7DEF1BD-0093-4D67-9D99-74F6CEB2D69A} = {B20C9B19-52F5-4AF1-B41D-D01294BEC6C9}
{D4E6343A-1042-CDB6-308D-6C1662607E77} = {B20C9B19-52F5-4AF1-B41D-D01294BEC6C9}
{EBBD9F26-59E7-0C55-0059-93AD3EB3469A} = {B20C9B19-52F5-4AF1-B41D-D01294BEC6C9}
{BB8FF9AE-4D47-47E7-9B22-F3ABDFDE28D1} = {B20C9B19-52F5-4AF1-B41D-D01294BEC6C9}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C7E9329B-84FE-436E-8A44-26D8176C5C6F}
Expand Down
19 changes: 7 additions & 12 deletions examples/BookstoreSimulator/BookstoreSimulator.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<Content Remove="wwwroot\Response.cs" />
</ItemGroup>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.9" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.3.0" />
<PackageReference Include="Serilog" Version="4.2.0" />
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0" />
<PackageReference Include="Npgsql" Version="8.0.4" />
<PackageReference Include="FluentValidation" Version="11.6.0" />
<PackageReference Include="Dapper.Contrib" Version="2.0.78" />
Expand Down
2 changes: 1 addition & 1 deletion examples/BookstoreSimulator/Controllers/BooksController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public async Task<IResult> CreateBook([FromBody] BookRequest request)
var book = BookDBRecord.Create(request, bookId);
var insertedResult = await _bookRepository.InsertBook(book);
if (insertedResult)
return Results.Ok();
return Results.Ok(bookId);
else
return Results.StatusCode(StatusCodes.Status500InternalServerError);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/BookstoreSimulator/Infra/DAL/OrderRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task<bool> CreateOrder(OrderDBRecord request)
{
try
{
var commandUpdate = @"UPDATE Books SET Quantaty = Quantaty - 1 WHERE BookId = @BookId";
var commandUpdate = @$"UPDATE Books SET Quantaty = Quantaty - {request.Quantaty} WHERE BookId = @BookId";
await connection.ExecuteAsync(commandUpdate, new { request.BookId }, transaction);

var commandInsert = @"INSERT INTO Orders
Expand Down
26 changes: 0 additions & 26 deletions examples/BookstoreSimulator/Pages/Error.cshtml

This file was deleted.

27 changes: 0 additions & 27 deletions examples/BookstoreSimulator/Pages/Error.cshtml.cs

This file was deleted.

10 changes: 0 additions & 10 deletions examples/BookstoreSimulator/Pages/Index.cshtml

This file was deleted.

20 changes: 0 additions & 20 deletions examples/BookstoreSimulator/Pages/Index.cshtml.cs

This file was deleted.

8 changes: 0 additions & 8 deletions examples/BookstoreSimulator/Pages/Privacy.cshtml

This file was deleted.

19 changes: 0 additions & 19 deletions examples/BookstoreSimulator/Pages/Privacy.cshtml.cs

This file was deleted.

51 changes: 0 additions & 51 deletions examples/BookstoreSimulator/Pages/Shared/_Layout.cshtml

This file was deleted.

48 changes: 0 additions & 48 deletions examples/BookstoreSimulator/Pages/Shared/_Layout.cshtml.css

This file was deleted.

This file was deleted.

Loading