-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix multiple results not returned with custom TestMethod and TestClass (#358) #363
Fix multiple results not returned with custom TestMethod and TestClass (#358) #363
Conversation
currentResult.Duration = watch.Elapsed; | ||
foreach (var testResult in testResults) | ||
{ | ||
testResult.DatarowIndex = rowIndex++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DatarowIndex is used for each row of data in dataSource.
By framework extensibility you have now started running each dataRow multiple times(say 5), but we should not increase dataRowIndex for each of the 5 runs of a DataRow. It should be incremented only once per dataRow and not once per testResult.
This statement should be testResult.DataRowIndex = rowIndex;
Do rowIndex++ separately outside of the loop.
@@ -160,6 +160,7 @@ public void ValidatePassedTestsContain(params string[] passedTests) | |||
{ | |||
foreach (var test in passedTests) | |||
{ | |||
var x = string.Join(", ", this.runEventsHandler.PassedTests.Select(_ => _.DisplayName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this.
Assert.AreNotEqual(3, customTestClass1ExecutionCount); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a data-driven test with [IterativeTestMethod] attribute
Kindly sign the CLA agreement as well. |
Thank you for your contribution @bignoncedric . This PR looks awesome. |
@bignoncedric : Any updates here? |
Any updates? I'm currently sorting the |
@bignoncedric any updates? |
@dotnet-bot Test Windows / Debug Build please |
This PR fixes the bug #358.
In
TestMethodRunner
, only the first element ofTestResult[]
returned byExecutor.Execute
was used.A test is also added to validate the RFC 003- Framework Extensibility for Custom Test Execution.