lkurzyniec / netcore-boilerplate

Boilerplate of API in .NET 8
GNU General Public License v2.0
493 stars 96 forks source link

2 Performance Tests Fail with StackTrace in stepStats.RPS and scenarioStats.LatencyCount. #17

Closed CoeqWEty closed 4 years ago

CoeqWEty commented 4 years ago

Hi Thanks for putting this together. When I run dotnet test unit tests pass pur issues with perf tests. Any ideas?

Test Run Successful. Total tests: 8 Passed: 8 Total time: 12.7045 Seconds

Test Run Successful. Total tests: 19 Passed: 19 Total time: 15.5701 Seconds

Test Run Successful. Total tests: 8 Passed: 8 Total time: 17.6956 Seconds [xUnit.net 00:00:17.85] HappyCode.NetCoreBoilerplate.Api.LoadTests.CarsControllerTests.GetAll_load_test [FAIL] X HappyCode.NetCoreBoilerplate.Api.LoadTests.CarsControllerTests.GetAll_load_test [9s 108ms] Error Message: Expected stepStats.RPS to be greater or equal to 20, but found 0. Stack Trace: at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message) at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message) at FluentAssertions.Execution.AssertionScope.FailWith(Func1 failReasonFunc) at FluentAssertions.Execution.AssertionScope.FailWith(Func1 failReasonFunc) at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args) at FluentAssertions.Numeric.NumericAssertions1.BeGreaterOrEqualTo(T expected, String because, Object[] becauseArgs) at HappyCode.NetCoreBoilerplate.Api.LoadTests.LoadTestsBase.<>c.<AssertResults>b__7_0(StepStats stepStats) in C:\Train\netcore EF services\netcore-boilerplate-master\test\HappyCode.NetCoreBoilerplate.Api.LoadTests\LoadTestsBase.cs:line 75 at System.Collections.Generic.List1.ForEach(Action1 action) at HappyCode.NetCoreBoilerplate.Api.LoadTests.LoadTestsBase.AssertResults(NodeStats stats) in C:\Train\netcore EF services\netcore-boilerplate-master\test\HappyCode.NetCoreBoilerplate.Api.LoadTests\LoadTestsBase.cs:line 72 at HappyCode.NetCoreBoilerplate.Api.LoadTests.LoadTestsBase.ExecuteLoadTest(String action, String method, HttpContent body) in C:\Train\netcore EF services\netcore-boilerplate-master\test\HappyCode.NetCoreBoilerplate.Api.LoadTests\LoadTestsBase.cs:line 33 at HappyCode.NetCoreBoilerplate.Api.LoadTests.CarsControllerTests.GetAll_load_test() in C:\Train\netcore EF services\netcore-boilerplate-master\test\HappyCode.NetCoreBoilerplate.Api.LoadTests\CarsControllerTests.cs:line 12 [xUnit.net 00:00:24.87] HappyCode.NetCoreBoilerplate.Api.LoadTests.EmployeesControllerTests.Post_with_Get_load_test [FAIL] X HappyCode.NetCoreBoilerplate.Api.LoadTests.EmployeesControllerTests.Post_with_Get_load_test [7s 254ms] Error Message: ****Expected scenarioStats.LatencyCount.Less800 to be greater or equal to 450, but found 230.**** Stack Trace: at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message) at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message) at FluentAssertions.Execution.AssertionScope.FailWith(Func1 failReasonFunc) at FluentAssertions.Execution.AssertionScope.FailWith(Func1 failReasonFunc) at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args) at FluentAssertions.Numeric.NumericAssertions1.BeGreaterOrEqualTo(T expected, String because, Object[] becauseArgs) at HappyCode.NetCoreBoilerplate.Api.LoadTests.LoadTestsBase.AssertResults(NodeStats stats) in C:\Train\netcore EF services\netcore-boilerplate-master\test\HappyCode.NetCoreBoilerplate.Api.LoadTests\LoadTestsBase.cs:line 70 at HappyCode.NetCoreBoilerplate.Api.LoadTests.LoadTestsBase.ExecuteLoadTests(IStep[] steps) in C:\Train\netcore EF services\netcore-boilerplate-master\test\HappyCode.NetCoreBoilerplate.Api.LoadTests\LoadTestsBase.cs:line 43 at HappyCode.NetCoreBoilerplate.Api.LoadTests.EmployeesControllerTests.Post_with_Get_load_test() in C:\Train\netcore EF services\netcore-boilerplate-master\test\HappyCode.NetCoreBoilerplate.Api.LoadTests\EmployeesControllerTests.cs:line 54

Test Run Failed. Total tests: 4 Passed: 2 Failed: 2 Total time: 35.4091 Seconds

lkurzyniec commented 4 years ago

@econetomics All assertion that we can see in AssertResults() method (click) are only my assumed thresholds on my local machine. You should adjust them according to your environment/infrastructure.

CoeqWEty commented 4 years ago

Thanks Lukasz. Im running it locally as well. I thought having a stack trace was an issue, but its working as designed I take it. Im going to buy you a coffee and connect with you on linkedin. I'm trying to learn through what you did because it seems pretty comprehensive and with capabilities that I like.

I was wondering if you are interested, if I could contribute to your project and you can help make me smart by learning thru your repository. Maybe a few sessions via skype and email/messaging. Need some hands on help and knowledge as a jump start. I have an offshore dev team I'm personally funding and I have been through some major refactors with them. On the mobile front end and I just dont like whats missing in some of the back end work. I'm trying not to code and just be the product owner, but its not been a great experience on getting what I want.

My unlaunched product is on AWS, .net core services deployed via docker on linux, schema is on mysql. Essentially services call stored procedures to get/set. Its not using EF. There are no unit, integration, or performance tests or use of swagger. Mobile front end is Xamarin 4.X calling backend services.

I need your email for inkedin and let me know if you can help me out. We can go from there. eb2b@yahoo.com is my email and skype

CoeqWEty commented 4 years ago

@lkurzyniec Hi Lukasz Cant connect with u on linkedin. Please see my comment above. and let me know . Thanks Bob

lkurzyniec commented 4 years ago

@econetomics thank you for your words, glad to hear that. I'll reach you today.