-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support for multiple reports with different granularity (file, class, method) #9
Open
victorgveloso
wants to merge
42
commits into
TestSmells:master
Choose a base branch
from
victorgveloso:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…renamed to hasSmell and hasProductionFile, reformatted code, pulled up similar members between TestClass and TestMethod, removed commented code, redundant comments and unused methods and variables, moved member initializeSmells to Main, extracted parseIntoCompilationUnit from duplication on detectSmells and reorganized for-loop on detectSmells
… fixed some warnings from GeneralFixture.java
…n the validation methods from AbstractSmell to MethodValidator
…l -> addDetectableSmell, TestFile.addSmell -> addDetectedSmell, ResultsWriter.writeColumnName -> writeColumnNames)
…BeforeEach' as setUp annotation and empty catch block on detectSmells (preventing FileNotFoundException propagation)
…writeCSV, moved output file handling methods from Main to ResultsWriter, related CSV header definition with properties through HashMap on TestFile.getTestDescriptionEntries method
…sWriter), removed code duplication by extracting methods (TestFile.removeExtension and TestFile.extractFileFromPath), removed TestSmellDetector.detectSmells return confusion (it was returning the param it received)
…lename without "." (dot) remain the same when its extension is removed
…rator aren't treated as special cases, they throw an IllegalArgumentException instead
…erclass of SmellyElement, TestClass and TestMethod TestSmellDetector add Smells on them (they now are compatible to ResultsWriter operations).
…anularity cfg by properties and handled by ReportController. Supported granularities: CLASS, METHOD and FILE.
…d with custom annotation and configured properly on maven). Necessary changes to TestSmellDetector to handle tested code on resources (also included on commit).
…ct' and improved assertions (validates no smells is detected); Dropped lambda usage on MethodValidatorTest (using Command pattern instead)
…e type smells on SmellsContainer.addDetectedSmell
…SmellDetector.detectSmells (it prevents duplicate smells removal on smells merging)
…when required). IgnoredTest results in false positive; ConstructorInitialization and GeneralFixture are not detected.
… path extraction based on first occurrence instead of last (fixing Queue test-case), ReportController tests partially implemented (FILE granularity is working)
…ty tests and missing Queue (smells-free) project resource
…) and removed outdated comment
…zed code (Smells and SmellyElements collections are internally treated as Set, but returned as list): simplified "contains" method and "upsert" operation.
- Isolating AbstractSmell instances per TestFile - SmellsContainer turned into a class and testSmells list made non-static
…ndentTest omission on failure
…port for JUnit5 @disabled annotation; updated tests
For optional reports configuration check properties file at https://github.com/victorgveloso/TestSmellDetector/blob/master/src/resources/test-smells.properties |
- Addressing @ellieMayVelasquez comment on my PR; - Fixing getResource bad practice.
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.
Added 2 csv optional reports (enabled by default). Each report contains test smells that affects a different granularity.
Tests included