Skip to content

Conversation

jgarec
Copy link
Contributor

@jgarec jgarec commented May 23, 2018

Adds test for new regex params (#12) and checks generated output for (#10)

jgarec added 3 commits May 23, 2018 16:27
* Move test project to a dedicated location * Fix generated coverage, and check file paths for utPLSQL#11 * Checks output file content (duration should be set to 1)
@jgarec
Copy link
Contributor Author

jgarec commented May 23, 2018

hummm, previous version was testing... nothing :)

Running org.utpsql.maven.plugin.test.UtPLSQLMojoTest [...] [info] Writing report UT_COVERAGE_SONAR_REPORTER to Console <coverage version="1"> </coverage> [info] Writing report UT_SONAR_TEST_REPORTER to /home/travis/build/utPLSQL/utPLSQL-maven-plugin/utplsql-maven-plugin/target/test-classes/utplsql/sonar-test-reporter.xml [info] Writing report UT_SONAR_TEST_REPORTER to Console <testExecutions version="1"> </testExecutions> 

Not sure using the demo project is a good thing in this case. Which solution do you prefer ?
Should i modify install_demo_project to run scripts inside utplsql-maven-plugin\src\test\resources\simple-project\scripts ?

@jgebal
Copy link
Member

jgebal commented May 23, 2018

Look at the file: .travis/install_demo_project.sh
It is actually installing (trying to install) the sources from utplsql-maven-plugin/src/test/resources
Since this PR is doing changes to the project structure and adds some more resources, that script needs to be updated for travis to deploy the packages.

@jgebal
Copy link
Member

jgebal commented May 23, 2018

Looks like merge done by @alberto-hernandez on commit: 08e3122 reverted the changes so develop does no longer contain the updated script - let me fix that

@alberto-hernandez
Copy link
Contributor

@jgebal, I push some changes in order to parametrize the credentials of the connection in order to pass it from Console for travis build.
About the testing of the plugin, I don't think that this is the correct approach. You are giving trying to reproduce Integration Testing validating the reports that the plugin doesn't know anything about it. If the java-api or the utplsql change the report the build of the maven plugin fails.

IMHO, the best approach would be creating other maven-project and use the utplsql-maven-plugin as a plugin-dependency. With this approach you isolate the test phase of each components from the integration test phase.

@jgarec
Copy link
Contributor Author

jgarec commented May 24, 2018

@alberto-hernandez I agree that we're not writing unit tests but integration tests. They should be moved to an "its" directory and probably run during the "integration-test" phase.

Unit tests should mock connection object and java-api (test runner), ensures maven plugin is calling java api right way.

Ignore windows / mac / linux carriage return differences Ignore test duration differences
Copy link
Member

@jgebal jgebal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good, nice work!

@alberto-hernandez alberto-hernandez merged commit 087505e into utPLSQL:develop May 29, 2018
@jgarec jgarec deleted the feature/add_regex_test branch August 2, 2018 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants