-
Notifications
You must be signed in to change notification settings - Fork 332
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
End To End Test Suite extended #583
End To End Test Suite extended #583
Conversation
…mparativeValueExtension
… to be able to create multiple resources folders per language.
…mparativeValueExtension # Conflicts: # jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/JPlagTestSuiteHelper.java # jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/JsonHelper.java # jplag.endToEndTesting/src/test/java/de/jplag/end_to_end_testing/JavaEndToEndTest.java
…mparativeValueExtension
…tingComparativeValueExtension
…r language to path translation
…dTestingComparativeValueExtension
Regarding the buidl error I am already looking for the problem. Likewise, I have local problem to build the project, since the module of Scala throws reference error with me |
There seems to be problem with comparing the SHA256 hashes created on my windows machine and the one created by the unix build. |
Thats may be related to line endings (\r\n for windows \n for windows). How did you created the SHA? (In Java or Locally) |
...g.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/JPlagTestSuiteHelper.java
Outdated
Show resolved
Hide resolved
...g.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/JPlagTestSuiteHelper.java
Outdated
Show resolved
Hide resolved
Meeting summary
|
@jplag/studdev can someone look over the PR so that this can be completed? |
@robinmaisch maybe you can review this PR and @SuyDesignz reviews your PR 594? |
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.
I admit that I don't get the bigger picture from just this diff, but I tried to refactor the code to be more readable or more "common practice" (based on what I perceive as such), which more often than not was accomplished by working with Collections/Streams. I prefer them over Arrays any day, but again, that's just me.
I typed the code into this website untested, so there might be some parentheses missing or something like that. Hopefully, my suggestions are still helpful. Good job!
jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/FileHelper.java
Outdated
Show resolved
Hide resolved
jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/FileHelper.java
Outdated
Show resolved
Hide resolved
jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/FileHelper.java
Outdated
Show resolved
Hide resolved
jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/FileHelper.java
Outdated
Show resolved
Hide resolved
jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/FileHelper.java
Outdated
Show resolved
Hide resolved
jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/model/ResultDescription.java
Outdated
Show resolved
Hide resolved
jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/FileHelper.java
Outdated
Show resolved
Hide resolved
jplag.endToEndTesting/src/test/java/de/jplag/end_to_end_testing/EndToEndSuiteTest.java
Outdated
Show resolved
Hide resolved
jplag.endToEndTesting/src/test/java/de/jplag/end_to_end_testing/EndToEndSuiteTest.java
Outdated
Show resolved
Hide resolved
jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/TestSuiteHelper.java
Outdated
Show resolved
Hide resolved
@SuyDesignz, please finish this PR today so it is ready to merge. |
…g/helper/TestSuiteHelper.java Co-authored-by: Robin Maisch <[email protected]>
…g/EndToEndSuiteTest.java Co-authored-by: Robin Maisch <[email protected]>
…g/EndToEndSuiteTest.java Co-authored-by: Robin Maisch <[email protected]>
…g/helper/FileHelper.java Co-authored-by: Robin Maisch <[email protected]>
…g/helper/FileHelper.java Co-authored-by: Robin Maisch <[email protected]>
I currently have problems to implement the new structure with the languages in the endToEnd tests. Since the languages are actually loaded automatically and this has now changed, I must first look at how I can adapt this now. |
Mapper and all other functions have to be adapted now. My current estimate is that the adjustment will take a little longer. |
…tingComparativeValueExtension # Conflicts: # jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/JPlagTestSuiteHelper.java # jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/model/TestCaseModel.java # jplag.endToEndTesting/src/test/java/de/jplag/end_to_end_testing/JavaEndToEndTest.java
Done with the adjustments and suggested changes. |
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.
Some comments
jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/helper/FileHelper.java
Outdated
Show resolved
Hide resolved
/** | ||
* Creates the permutation of all data contained in the passed parameters and adds it to the given path. | ||
* @param fileNames for which the permutations are needed | ||
* @param path to which the permutations are to be copied | ||
* @return all permutations of the specified files to the path specified | ||
*/ | ||
public static List<String[]> getTestCases(String[] fileNames, Path path) { | ||
ArrayList<String[]> testCases = new ArrayList<>(); | ||
int outerCounter = 1; | ||
for (String fileName : fileNames) { | ||
for (int counter = outerCounter; counter < fileNames.length; counter++) { | ||
testCases.add(new String[] {Path.of(path.toAbsolutePath().toString(), fileName).toString(), | ||
Path.of(path.toAbsolutePath().toString(), fileNames[counter]).toString()}); | ||
} | ||
outerCounter++; | ||
} | ||
return testCases; | ||
} |
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.
I agree here. Please change that.
jplag.endToEndTesting/src/main/java/de/jplag/end_to_end_testing/model/ResultDescription.java
Outdated
Show resolved
Hide resolved
I'm not sure right now what I should change in the function? |
What function? |
That I should change something about the function "getTestCases" in public static List<String[]> getTestCases(String[] fileNames, Path path) { |
It's cleaner to use two for(int i = 0,... ) loops here; instead of using a enhanced for loop with index counter outside. |
Kudos, SonarCloud Quality Gate passed! |
@SuyDesignz did you resolved all open conversations? If so, just drop a comment here :) |
@dfuchss Yes I did :) not sure why I can't close #583 (comment) but the other comments have been edited |
Extension Of The End To End Module
The extension of the EndToEnd tests includes the following new features/Fixes:
LanguageToPathMapper.java
JPlagTestSuiteHelper.java
For more necessary information please have a look at the README.md file.
Meeting summary
DONE: