Repository navigation
C# conformance suite: remove the 239 test methods that detect nothing of their own - #133
Merged
Merged
Conversation
…eir own The suite had 1280 cases in 866 methods, written feature by feature while C# was compared with Java. Many repeat each other: 130 of the 215 classes covered no runtime line that another class did not cover. This removes the methods (283 cases) that the remaining tests and the portable scenarios make superfluous, and keeps 997 cases in 627 methods. A test stayed if - it exchanges documents with the Java programs or reads a shared expectation in fixtures/ (268 methods): the gate checks every such file in both languages as before; - it was written together with a runtime change (14 methods); - it guards against what a seeded fault cannot show: recursion as deep as a limit allows, the largest sequence numbers, concurrent use (6); - or the others needed it (339 methods) to still notice every fault that the full suite noticed, reach every place of the runtime it reached, and run every shape of generated code it ran. Faults are from mutation testing with Stryker.NET 5.1: 9,521 single changes of the runtime, of which the full suite and the portable scenarios noticed 6,799. A repeat with the kept tests noticed 6,793 of them again; the tests that had noticed the six others are among the kept ones, and their result varies between runs of the instrumented runtime. No model set lost all of its tests, so the gate generates and compiles what it did before and takes as long. TEST-AREAS.md has the new counts per area and describes the rules; the README says that not every sentence of its list has a C# test of its own any more. ReferenceDefaultBindings.DuplicateSeed was only set by a removed test.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The C# conformance suite had 1280 cases in 866 test methods, written feature by feature while C# was compared with Java, and many of them repeat each other. This removes the 239 methods (283 cases) that detect nothing which the remaining tests and the portable scenarios do not detect as well. 997 cases in 627 methods stay.
What stayed
fixtures/The last group is a smallest-set choice over three measurements of the full suite:
Evidence
The mutation run was repeated with the kept tests. They noticed 6,793 of the 6,799 changes again. None of the six others went with a removed test: the tests that had noticed five of them are kept, and they notice these changes only in some runs of the instrumented runtime (with the change made by hand in the normal runtime, they pass); the sixth was a timeout of the first run whose only test is kept too. The four faults that the first reduced suite had let through are noticed again.
Runtime line coverage of suite and scenarios together is unchanged: 8,958 of 9,415 coverable lines.
:vmf:verifyCSharpConformancepasses with 997 cases; all 49 Java programs that read documents written by C# pass.No fixture lost its C# reader, and no model set lost all of its tests.
What it does not change
The gate takes as long as before: its time is code generation and compilation of the 36 model sets in two languages, and none of them could go.
Cases per area
"Before" is the count on
mainbefore #132, which added 14 cases (containment 7, events 6, reflection 1).How the selection was corrected on the way
A first selection, by seeded faults, lines and shapes alone, kept 579 methods. Three things it could not see were added before anything was merged:
Limits
A removed test may have checked something that no seeded fault resembles and no line, branch or shape tells apart. About 2,160 seeded changes could not be tried because the changed code does not compile (among them everything in
ContainmentList.ReplaceRange); there the line and branch rules are the only measure. The selection tooling is not part of the repository.