-
Notifications
You must be signed in to change notification settings - Fork 154
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
Change how ConfigSystemTest
is done by using RepoSense::main
#1645
Comments
@chan-j-d, I think this can be done using if (shallowCloning) {
inputBuilder = inputBuilder.addShallowCloning();
}
if (findPreviousAuthors) {
inputBuilder = inputBuilder.addFindPreviousAuthors();
} I believe the same can be done for the other variables. Namely A problem I found when attempting this is deleting of the directory in |
@chan-j-d can I try this issue? My idea is to add new flags into |
I'm not too sure I understand the approach you're taking. Drawback 3 has been somewhat addressed in this PR #1746. I think that PR was the main direction I had in mind where we construct tests in the form of CLI command arguments and just pass it into You could share your implementation branch and I could take a look. If possible, I'd prefer not to add a flag just for testing to production code though you might have thought of something to make it work. |
A new flag is definitely required for Also there is an extra line in
Here is my implementation branch. In my case, I extended E.g.: RepoSense/src/systemtest/java/reposense/ConfigSystemTest.java Lines 45 to 53 in c3407f3
I'll take a look at #1746 to see what I can take from it and add to |
The current setup with the ConfigSystemTest::generateReport method bypasses the parsing of the original CLI arguments and setting up of RepoConfigurations. If the main method is changed, then this method would also have to be updated, which can be troublesome. It is more beneficial to use RepoSense::main instead for the full end-to-end validation. Let's rewrite the runTest method to use RepoSense::main method.
What change(s) would you like to see in RepoSense?
Change how system tests are run by using the
RepoSense::main
method to provide full end-to-end validation through supplying CLI arguments and comparing the output JSON files.Is the feature request related to a problem?
Adding new system tests can be difficult as the existing methods use the config files in the
resources
folder by default. This makes it difficult to perform tests on more specific scenarios such as using a new config file to test against a specific branch of a specific repo only.The current setup with the
ConfigSystemTest::generateReport
method also bypasses the parsing of the original CLI arguments and setting up ofRepoConfiguration
s. If themain
method is changed, then this method would also have to be changed with it. I believe it would be beneficial to useRepoSense::main
instead for the full end-to-end validation.Setting up test cases would then be similar to specifying the exact CLI arguments that we would normally run against the RepoSense.jar file.
If possible, describe the solution
Rewrite the
runTest
method similar to something in this experimental PR here. Only one test case has been rewritten here to be as similar to the original as possible. The output for the authorship files are not exactly the same as the one used currently and I have not been able to replicate it properly using only the CLI arguments.Additional context
Immediate drawbacks
shallowCloning
andfindPreviousAuthors
that still have to be passed to therunTest
method as they directly affect the behaviour of the test case.The text was updated successfully, but these errors were encountered: