Comments (15)
@LydiaAzzoug Thanks for letting us know.
Still, this does not explain why the tests run in utPLSQL but not in the SQLDev extension. I still think we miss here something.
However, since the issue is not reproducible on your side I close the issue.
from utplsql-sqldeveloper.
Hello @LydiaAzzoug
Please do not use utPLSQL SQLDeveloper extension to report issues in utPLSQL. It makes it very hard to understand if the problem is with utPLSQL or with the extension. It also is harder to see what is going on.
The best you could do is to report the errors from plain-text begin ut.run('MBED4_TEST.TEST_ADDITION'); end;
This will produce output to the DBMS_OUTPUT.
Also, when you are referencing "MBED4 and MBED4_TEST databases" I suspect you are not really talking about separate database instances that you connect to, but you are actually talking about different database schemas in a single database instance.
Please try to use precise names. DATABASE, DATABASE INSTANCE and DATABASE SCHEMA are very different things.
Anyway,
It seems that you're struggling to understand why utPLSQL fails to execute the test-suite package.
To help you understand what is required let me give you few tips.
utPLSQL executed the tests as using the session and privileges of the connected user. It will always look for things to execute in context of CURRENT SCHEMA if not schema name is given when executing stuff.
If you want to execute test suite TEST_ADDITION
that exists in schema MBED4_TEST
try running the following series of commands from sql worksheet in SQLDeveloper
select username from all_users where username = 'MBED4_TEST';
--will show the connected user name as well as the current schema of that user
select user, sys_Context('userenv','current_schema') from dual;
--will show a record with information about the test package and it's status
select object_name, object_type, status from all_objects where owner = 'MBED4_TEST' and object_name = 'TEST_ADDITION';
--will show test package specification as it is in the database schema
select line, text from all_source where owner = 'MBED4_TEST' and name = 'TEST_ADDITION' order by line;
set serveroutput on
--will execute the test procedure outside of utPLSQL framework runner.
begin
MBED4_TEST.TEST_ADDITION.myfunction;
end;
/
--will run the test package using utPLSQL
begin
ut.run('MBED4_TEST.TEST_ADDITION');
end;
/
Please share the output from execution of the above script as TEXT (not as a screenshot)
That way I can check and review what is cause of your problem.
from utplsql-sqldeveloper.
hello,
You will find attached two outputs, one for MBED4 and the other for MBED4_TEST
DBMSOutput_MBED4_TEST.txt
DBMSOutput_MBED4.txt
Thank you in advance
from utplsql-sqldeveloper.
In both outputs it is clear that utPLSQL works and executes the tests.
I really don't see this as a utPLSQL isssue. IT must be something related to SQLDeveloper or SQLDeveloper extension.
Are you able to do a screen recording of the issue you are facing?
from utplsql-sqldeveloper.
from utplsql-sqldeveloper.
The video is very bad quality so I have a hard time to even see what packages are being run etc. Can you retry it with at least 640p, better 1080?
from utplsql-sqldeveloper.
I see the key issue. The issue is related to SQLDeveloper extension. The extension fails to run the tests for some reason.
The tests run in Worksheet but no tests are found when running via SQLDeveloper - extension.
I will move that issue to SQLDeveloper extension project
@LydiaAzzoug - You will need to provide a bit more details:
- version of SQLDeveloper
- version of utPLSQL-SQLDeveloper extension
@PhilippSalvisberg - anything else is needed?
from utplsql-sqldeveloper.
When I look at the screen shot then I do not see a suite and test annotation. Therefore the message "no tests found" is correct.
from utplsql-sqldeveloper.
from utplsql-sqldeveloper.
@LydiaAzzoug I can reproduce the problemn when I create a test package in the SQLDev editor but do not deploy it in the database.
Please try the following:
Create the following code in the SQLDev editor
create or replace package test_addition is
--%suite(ut3)
--%suitepath(alltests)
--%test
procedure myfunction;
end test_addition;
/
and deploy it by pressing Ctrl-Enter
or by pressing this icon in the toolbar of the worksheet:
and then select run utPLSQL test
from the context menu in the editor
In my SQLDev, the result looks like this:
Please try also to run the the following in a new SQLDev worksheet using the same connection as the one you used to deploy the test package:
set serveroutput on size unlimited
execute ut.run('test_addition');
In my case the result looks like this:
What are the results in your case?
from utplsql-sqldeveloper.
from utplsql-sqldeveloper.
@LydiaAzzoug can you please post the result of
set serveroutput on size unlimited
execute ut.run('test_addition');
Thank you.
from utplsql-sqldeveloper.
@LydiaAzzoug: Since we cannot reproduce the problem, we obviously miss something. utPLSQL seems to work fine. Just the SQL Developer extension does not find any tests. Right?
Could you please provide all information to make the issue reproducible.
- Oracle SQL Database version
- utPLSQL version
- SQL Developer version
- utPLSQL for SQL Developer version
- Exact steps you are doing to run the tests. In text form or a video with a good resolution which is available on a public channel like youtube.
- The source of the test package
Thanks.
from utplsql-sqldeveloper.
from utplsql-sqldeveloper.
from utplsql-sqldeveloper.
Related Issues (20)
- Change default value of "Show description (if present)" preference HOT 2
- Typo HOT 1
- Can't find libraries HOT 1
- Suggestions for working with legacy codebase with "UT" package? HOT 3
- Empty utPLSQL windows when `Show suites (hierarchical view of tests)?` is unchecked HOT 9
- Test result window not showing up HOT 7
- Multiple spaces are replaced by single spaces in failure message HOT 2
- Add support for disabled reason with utPLSQL v3.1.12 HOT 2
- plans to update to more recent SQL Developer version? HOT 7
- Update code templates using AAA
- Missing line break after suite annotation in generator skeleton template
- 'Run utPLSQL test' on the test package doesn't display the utPLSQL window. HOT 2
- German translation of "Failures" is inconsistent
- Opportunities for silent rolllout with an SCCM like ACMP ? HOT 2
- Instructions for generating coverage report without access to public internet HOT 3
- Enable one unit test in a bunch of Unit Tests HOT 4
- Start utPLSQL tests with an arbitrary utPLSQL path
- Pressing Create code templates does nothing HOT 2
- Enhancement: Keep Test Code Coverage module list settings between runs HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from utplsql-sqldeveloper.