X Tutup
The Wayback Machine - https://web.archive.org/web/20201124081405/https://github.com/utPLSQL/utPLSQL/issues/1069
Skip to content
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

Integrating utplsql with visual studio #1069

Open
anandsagar0126 opened this issue Apr 12, 2020 · 5 comments
Open

Integrating utplsql with visual studio #1069

anandsagar0126 opened this issue Apr 12, 2020 · 5 comments

Comments

@anandsagar0126
Copy link

@anandsagar0126 anandsagar0126 commented Apr 12, 2020

*Hello @jgebal I am looking to implement a use case where I would like to integrate utplsql with a visual studio IDE , run unit test cases and generate code coverage all using one wrapper procedure. Can you please help me with some steps or documentation that I can refer to? thanks a lot for your help in advance!
I feel this could be a game changer for large enterprises. please feel free to revert with questions. Thanks!

@jgebal
Copy link
Member

@jgebal jgebal commented Apr 13, 2020

Hi @anandsagar0126
A the moment we don't have integration API well-documented - #904 issue is opened to have it documented.

We have however an API :)
The API we have is already used by SQLDeveloper extension, IntelliJ (since release 2020.1), TOAD as well as out utPLSQL-java-api project.

I'm not sure how would you prefer to integrate with Visual-Studio and is it Visual Studio or VS Code integration that you're looking at?

Would you rather use PLSQL API or Java API (from utPLSQL-java-api project)?

The key benefit of using utPLSQL-java-api is that it is backward compatible with all utPLSQL v3 versions.

The PLSQL API of utPLSQL was evolving between releases and some things had to be changed to enable project to evolve.

If you would go with pure PLSQL API it is probably best to keep compatibility with version 3.1.8+
When integrating, as we extend API (add new parameters and options), the API consumer needs to be version-aware to some extent.

If you would like to run tests by tags - it will only work on versions where tags functionality was already added.

To see how to call the API, have a look at that issue #955
If you want to use real time-reporting (to show progress of tests as they get executed), you need to have two sessions open.

  • session 1 - producer - is used to invoke utPLSQL test run using ut_runner.run procedure
  • session 2 - consumer - is invoked after starting run in session 1 and is used to consume test results as the execution in session 1 is progressing.

You can use multi-reporting - generate multiple reports from a single test-run.
This way you can generate both Code coverage and test results.

The reporters that are useful for realtime-reporting integration are:

  • ut_teamcity_reporter
  • ut_realtime_reporter

ut_documentation_reporter also produces results in real-time but it is not build for integrations and doesn't provide sufficient details to make it usable for anything else than just displaying plain-text to the screen

For coverage, you also have few options, depending on fits you.
Probably one of those reporters will be useful:

  • ut_cobertura_reporter - XML
  • ut_coverage_sonar_reporter - XML
  • ut_coveralls_reporter - JSON

Let me know if this is sufficient to get you going.

@jgebal
Copy link
Member

@jgebal jgebal commented Apr 13, 2020

@anandsagar0126
Can you also let me know:

  • where would you like to host the utPLSQL-Visual Studio integration project?
  • is it going to be open-source?
  • would you like it to be hosted as one of utPLSQL repositories?
@anandsagar0126
Copy link
Author

@anandsagar0126 anandsagar0126 commented Jul 18, 2020

Hello @jgebal!
sorry for the very late responses. I am having a switch between tech and non-tech activities hence couldn't reply on time. I would like both API & headless.sql execution (local schema). APIs will help as I can to call via visual studio code as an extension or simple plugin etc.
Now, are utplsql apis available for Visual studio code to be integrated?
2nd issue I am using aws rds version of oracle via an endpoint connection and it doesn't have sysdba privilege but I do have master role. Is it possible to install utplsql 3 in rds oracle version?

As I had mentioned earlier, if we can solve some of these problems. this tool looks very promising and relevant in today's context.

@anandsagar0126
Copy link
Author

@anandsagar0126 anandsagar0126 commented Jul 18, 2020

@anandsagar0126
Can you also let me know:

  • where would you like to host the utPLSQL-Visual Studio integration project?
  • is it going to be open-source?
  • would you like it to be hosted as one of utPLSQL repositories?

I would prefer a separate workpace in visual studio code with folder structure created for UI, JAVA Business layer, and database and uinit test tec.

Righ now the biggest struggle is this -
SQL> @install.sql ut3

Installing utPLSQL v3 framework into ut3 schema

Switching current schema to ut3

declare
*
ERROR at line 1:
ORA-20000: The following privileges are required for user "ANANDORA" to install into schema "UT3"

  • CREATE ANY CONTEXT
  • CREATE ANY PROCEDURE
  • CREATE ANY SEQUENCE
  • CREATE ANY SYNONYM
  • CREATE ANY TABLE
  • CREATE ANY TYPE
  • CREATE ANY VIEWPlease read the installation documentation at http://utplsql.org/utPLSQL/
    ORA-06512: at line 27
@jgebal
Copy link
Member

@jgebal jgebal commented Jul 19, 2020

What privileges are granted to user ANANDORA?
Is this the admin user on AWS RDS?

I wasn't experimenting with AWS RDS Oracle installation so I'm not sure how to get around this.

If you could list the privileges your ADMIN user has, I could help you get through the install process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.
X Tutup