1

I see that in sqldeveloper, you can create a unittest, in my case this would just be a simple query checking if any data is returned.

What I want to figure out is how to run this unittest from the command line.

I feel like this is kind of my last resort, as I've been unable to directly connect to the Oracle db via python libraries (sql.connector) and I'm also having trouble installing Oracles own instant client and CLI tools. Therefor, the only solution I can think of is to use sql developer, which I have already used to establish a connection to my database, and the built in unit test tools.

Ben
  • 519
  • 1
  • 7
  • 14
  • There's a [Java-based command line client](http://www.oracle.com/technetwork/issue-archive/2015/15-sep/o55sql-dev-2692807.html) that goes with SQL Developer, and you can download that from [the same place](http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html). Seems like it would be better to ask how to fix your Python and/or instant client issues. Oh... [you did](http://stackoverflow.com/q/37711482/266304)... – Alex Poole Jun 14 '16 at 16:53

1 Answers1

0

If you're using SQL Developer 4.1 then you should have a CLI program available in the bin directory called sdcli.exe.

Using this you can execute your tests and test suites that have installed into a test repo from the command line e.g.

./sdcli.exe unittest -run -suite -name AWARD_BONUS_SUITE -repo UNIT_TEST_REPO_CONNECTION -db TARGET_SCHEMA_CONNECTION

Some good resources are:

nickebbitt
  • 1,711
  • 1
  • 13
  • 13