- Notifications
You must be signed in to change notification settings - Fork5
Java API for running utPLSQL v3+ unit tests from java applictions
License
utPLSQL/utPLSQL-java-api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a collection of classes, that makes easy to access theutPLSQL v3 database objects using Java.
- Usesut_runner.run methods to execute tests.
- Can gather results asynchronously from multiple reporters.
This is a Maven Library project, you can add on your Java project as a dependency.
You install this Maven repository by adding it to the section of your pom.xml. No special plugins or extensions are required.
<repositories> <repository> <id>utplsql-java-api</id> <url> https://packagecloud.io/utplsql/utplsql-java-api/maven2 </url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository></repositories>
To use the java-api library, add this to the<dependencies>
section of yourpom.xml
.
<dependency> <groupId>org.utplsql</groupId> <artifactId>java-api</artifactId> <version>3.0.4</version> <scope>compile</scope></dependency>
The latest Java-API is always compatible with all database frameworks of the same major version.For example API-3.0.4 is compatible with database framework 3.0.0-3.0.4 but not with database framework 2.x.
Executing tests using default parameters:
try (Connectionconn =DriverManager.getConnection(url)) {newTestRunner().run(conn);}catch (SQLExceptione) {e.printStackTrace();}
Executing tests and printing results to screen:
try (Connectionconn =DriverManager.getConnection(url)) {ReporterdocumentationReporter =newDocumentationReporter().init(conn);newTestRunner() .addReporter(documentationReporter) .run(conn);newOutputBuffer(documentationReporter) .printAvailable(conn,System.out);}catch (SQLExceptione) {e.printStackTrace();}
To develop it locally, you need to setup your maven environment.
That's the easy part, you just need to download the Maven binaries and extract it somewhere, then put the maven/bin folder on your PATH.
https://maven.apache.org/install.html
Don't forget to configure your JAVA_HOME environment variable.
The library uses OJDBC Driver to connect to the database, it's added as a maven dependency. To be able to download the Oracle dependencies, you need to configure your access to Oracle's Maven Repository:
http://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9010
Sections 6.1 and 6.5 are the more important ones, and the only ones you need if you're using the latest Maven version.
After configuring your access to Oracle's Maven repository, you will be able to successfully build this API.
cd utPLSQL-java-apimvn clean package install -DskipTests
The cmd above is ignoring unit tests because it needs a database connection with the latest utPLSQL v3 installed. Please take a look on .travis.yml and .travis folder to see how testing was configured.
About
Java API for running utPLSQL v3+ unit tests from java applictions
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.