Question of unit tests

Hi all

Creating the Unit Test case for a procedure or a function with a PL/SQL table as an input/output setting, the system throws an error "the return type table is not supported.

Why is it so? Pointers?

Thank you

Anand

The unit test supports only the SQL types, no type of PL/SQL. There is no reference to it in the documentation.

Tags: Database

Similar Questions

  • sql question 4.1.1.19.59 of unit test developer

    Hello

    4.1.1.19 version build HAND - 19.59 I had a problem to run the unit tests with exception as expected result. No matter if I say "ANY" or specify an error number. All the tests fail. Must be a bug.

    Oracle SQL Developer  API_OBJEKTARTEN.GetXMLViewName.png

    Kind regards.

    SQL Developer restarting solves the problem.

  • Unit Test Framework: Inline Subvi test coverage

    Hello

    does anyone know if the Unit Test Framework considers inline subVIs recursively during the measurement of coverage?

    Consider following the example:

    f(a:int) {}

    g() ;

    }

    g() {}

    If (false) - return 1;

    else return 0;

    }

    Obviously, there is no test for g() with coverage of 100% (branch), and any trial for f() reaches 100%.

    My question is: given a test for f(), UTF gives a different cover if I set to be (Inline g()<100%) or="" not="">

    Thank you

    Peter

    Peter,

    No, the Subvi cannot be analysed for coverage of the code if the value inline.

    Fact is, that this feature requires the option 'Allow debugging' must be disabled (Yes, I hate double-negation!), but if it is not allowed to debug, the code coverage will result in 0%.

    See Help:

    "You have to allow debugging for each VI under test to measure the code coverage. If VI a VI under test properties have not checked the checkbox allow debugging , the result of code coverage will always be zero. »

    Norbert

  • Unit test, Visual Studio 2010 digital input read event

    Hello!

    I have problems in Visual Studio 2010, using NOR-DAQmx, but ONLY in a unit test project. I have compiled a dll that uses a DigitalChangeDetection task handler. The dll work very well in a draft standard form, but does not work in a Test project.

    I used .NET Framework 4.0 with success. Tried to switch to .NET framework 3.5, but it is not possible for a test project in Visual Studio 2010.

    When I start my test, it works fine until the event is raised. Once he does, the test will stop without exception or detail except the following result:

    "The agent process was stopped during the execution of the test."

    Nothing is caught in the trap in debugging.

    Also, I get the following in the Event Viewer error message:

    Log name: Application
    Source: VSTTExecution
    Date: 2010-12-01 11:32:31
    Event ID: 0
    Task category: no
    Level: error
    Keywords: Classic
    User: n/a
    Computer: xxx
    Description:
    The description for event ID 0 in source VSTTExecution is not found. Either the component that triggers this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

    If the event is on another computer, the display information had to be saved with the event.

    The following information has been included in the event:

    (devenv.exe, PID 5592, walk on 73) OutOfProcessStrategy.ProcessMonitorThread: The Agent process was closed unexpectedly. will attempt to restart

    the message resource is present, but the message is not in the string/message table

    The event XML:
    http://schemas.Microsoft.com/win/2004/08/events/event">
     
       
        0
        2
        0
        0 x 80000000000000
       
        10312
        Application
        xxx
       
     

     
        (devenv.exe, PID 5592, walk on 73) OutOfProcessStrategy.ProcessMonitorThread: The Agent process was closed unexpectedly. will attempt to restart
     

    I understand that Visual Studio 2010 is not yet officially supported so here's my 2 questions:

    -I'm the only one experiencing this problem? (Easily duplicated by taking the sample project: DotNET3.5\Digital\Read Values\ReadDigChan_ChangeDetection_Events and extract the relevent part of to put in a separate dll so that you can try to UnitTest in a project UnitTest.)

    -Update on what NOR-DAQmx will rely on VS2010? (I read here: http://forums.ni.com/t5/Measurement-Studio-for-NET/Support-for-Visual-Basic-2010-NET-4-Framework/m-p... this is supposed to be before the end of the year, but no updates would be great because I could not find any information on it)

    Best regards

    Pierre-Luc

    Hello Pierre,.

    As NOR-DAQmx is not yet officially supported in Visual Studio 2010, it is not quite clear why this problem occur. At this point, the official release date has not been announced yet, however, please continue to check the updates to www.ni.com/support (drivers and updates). Thank you

    Best regards

    M Ali

    Technical sales engineer

    National Instruments

    www.NI.com/support

  • Unit Testing Unit Test Framework when the expected production is just a table of NaNs to report a fake PASS

    It is a cross-post of the Unit Testing Group:

    https://decibel.NI.com/content/message/121915#121915

    I remember having this problem with the old version of the unit testing framework, but alas, it is still present in the new version.

    To do this, I use LabVIEW 2015.

    A customer contacted ask me what to do, because the expected output was table of NaNs and the VI under test returns an array of numbers and yet, the test was passing!

    My suggestion to use as a solution was to create a defined trial user who would test for the table of NaNs. I was wondering if someone here had found this problem and if you have further suggestions other than user defined Test.

    Until someone suggests we turn to JKI VI tester for this project, I can tell you that we use UTF and tester of JKI VI not because the client is in a regulated industry.

    A video describing the problem and the workaround (via user defined Tests) is here: https://youtu.be/AoBe-Gw2Nzo

    Question: Is using a user defined Test is the best approach? We missing something in the way that the Unit Test is defined which translates the fake of the Test infrastructure Unit reports that the test successful?

    Thank you

    Fab

    Hey Fab,

    I was able to reproduce the problem on my machine and I have observed the same results. What I see in the video, it looks that you are setting the unit test. I think that this is a bug rather than your test configuration, so I presented a report on this issue will have to be reviewed by the R & D.

    Go ahead, I agree that a user defined Test is the best solution in this case. If it meets the needs of your clients, I recommend you take this option.

  • VI test a string control configured to view password, it displays 'normal view' mode in the Unit Test Framework lvtest Properties dialog box

    Configuration of the password does not lvtest UTF Properties dialog window. It's probably a bug.

    Hey jorgeinSD,

    The Unit Test is designed to test the input values and compare them with a desired output value to make sure that your VI works under different entries. For this reason, it is necessary that the user makes tests see the entry and not just values «*» Your VI should not change (as in the VI should still display mode password, ' * '), but the properties of Unit Test should display the actual value and not mode password. Is that what you mean by 'configuration of the password does not UTF' or did, I misunderstood the question? I hope this helps!

    -Nathan H

  • Site update for unit test infrastructure Momentics

    I asked this question in the forum WebWorks and got no response... I was hoping this would be a trivial:

    I want unit test my native extension WebWorks. I came across this video and presentation PDF of BlackBerry https://bblive.blackberryconferences.net/2013/connect/sessionDetail.ww?SESSION_ID=2735 . This suggests that you have developed an extension for this purpose. On slide n ° 7, it says 'add site update... '. "where the plugin can be sought.

    Unfortunately, the URL of the update site is not mentioned in the PDF or a video presentation and I can't seem to find anywhere on the net... One of the admins know what this could be?

    Maybe this one: https://github.com/blackberry/MomenticsUnitTestingPlugin ?

  • Unit test in sql developer 4.1 fails but passes in 4.0

    I can't tell if it's a question of Java or Sql * developer issue.

    SQL * Developer Version: 64-bit 4.1.0.17.29

    Versions of Java: Tried jdk 8: 1.8.0_5, 1.8.0_20 and 1.8.0_31 - all 64 bits

    That is the message in the response of unit test:

    CPS_TOOLS.PREP_FOR_DELIMITED_FIELD failed: Missing defines
    oracle.jdbc.driver.Accessor.isNull(Accessor.java:744)
    oracle.jdbc.driver.CharCommonAccessor.getString(CharCommonAccessor.java:350)
    oracle.jdbc.driver.OracleCallableStatement.getString(OracleCallableStatement.java:661)
    oracle.jdbc.driver.OracleCallableStatementWrapper.getString(OracleCallableStatementWrapper.java:860)
    oracle.jdbc.proxy.oracle$1dbtools$1raptor$1proxy$1driver$1oracle$1RaptorProxyOJDBCStatement$2oracle$1jdbc$1internal$1OracleCallableStatement$$$Proxy.getString(Unknown Source)
    oracle.dbtools.raptor.datatypes.strategies.callablestatement.CallableBindingVARCHAR.customOutputByPosition(CallableBindingVARCHAR.java:51)
    oracle.dbtools.raptor.datatypes.strategies.callablestatement.CallableBindingDatumAtName.customOutput(CallableBindingDatumAtName.java:123)
    oracle.dbtools.raptor.datatypes.impl.CallableBindingImpl.getOutput(CallableBindingImpl.java:74)
    oracle.dbtools.unit_test.testObjects.UtTestImplArgs.getOutput(UtTestImplArgs.java:320)
    oracle.dbtools.unit_test.runner.Runner.executeRunn ...
    
    
    

    Now, the same unit test works with the following text:

    SQL * Developer Version: 64-bit 4.0.2.15

    The Versions of Java: 64 bit jdk 7 - 1.7.0_55

    I tried to follow here debug information collection:

    http://www.thatjeffsmith.com/archive/2012/06/how-to-collect-Debug-Info-for-Oracle-SQL-Developer/

    However, there is no report in the command window after a ctrl-pause/break. At the same time, however, it is not like sql * developer hangs here.

    Thoughts?

    EA 4.1 includes a new feature to save all JDBC calls (view > Log, and then note the statements tab in the logs pane), so it could be the difference in the behavior of Test Unit between 4.0 and 4.1.

    You use the JDBC default 12.1 driver, or you have overridden by specifying a particular Oracle client?  In other words, in

    Tools > Preferences > Database > advanced > use Oracle client > configure...


    I read that somewhere there may be problems when you use the clients pre - 12 c with earlier versions of JDBC. driver

  • Is there a real BENEFIT in SQL * Developer Automated Unit Testing?

    I'm trying to understand the unit test in SQL * Developer. Asked me to evaluate it as a method of test automation on an integration solution that we develop.

    (1) my 'A' schema has this table:

    SQL > DESC EMP

    Name                                      Null?    Type

    ----------------------------------------- -------- --------------------

    EMPID NOT NULL NUMBER

    EMPNAME VARCHAR2 (30)

    SALARY NUMBER (7.2)

    COMM_PCT NUMBER (2.2)

    Table (2). has these values:

    SQL > SELECT * from emps;

    EMPID EMPNAME SALARY COMM_PCT

    ---------- ---------- ---------- ----------

    1 ROHAN 10000.05

    2 JOHN 20000

    3 PETER.06

    4 SMITH

    (3.) I create this procedure in drive A:

    create or replace

    PROCEDURE award_bonus (NUMBER, sales_amt NUMBER p_empid)

    AS

    REAL Commission;

    comm_missing EXCEPTION;

    BEGIN

    SELECT comm_pct IN the commission OF EMP

    WHERE empid = p_empid;

    IF the commission IS NULL THEN

    RAISE comm_missing;

    ON THE OTHER

    PGE UPDATED

    SET salary = salary + sales_amt * commission

    WHERE empid = p_empid;

    END IF;

    END award_bonus;

    (4) now, I want to create a unit test in SQL Developer to test this procedure.

    (5) I created a user "unit_test_repos" according to the instructions in the tutorial.

    (6) ' SELECT OPERATION': I specifies the procedure of award_bonus.

    (7) ' SPECIFY the name of test': give a name and select "create with a single model.

    (8.) 'SPECIFY the STARTUP': Add a ' copy Table or the line "the startup process.

    -I give "EMP" as the source table.

    -And then I get this for the 'generated query.

    SELECT ROWID AS SRC$ ROWID, s.* FROM EMP s

    -Target table has "TMP$ AWARD_BONUS.

    (Q1) WHAT IS THE PURPOSE OF CREATING ANOTHER TABLE?

    (Q2) WHEN THE TEST IS DONE, ARE ROWS OF PGE copied into this table?

    (Q3) Why is this? Why can't the test simply read 'EMP '?

    (9) "PARAMETERS SPECIFY": I give "Input".

    -1 for P_EMPID

    -10000 for SALES_AMT

    -In "Expected result", I say "success."

    (Q4) So I should know in my mind the results of the proc, foregoing given entries?

    (10) ' SPECIFY VALIDATION': I add validation "poll rows of queries.

    -I paste the following query: SELECT count (*) FROM EMP WHERE empid = 1 AND salary = 10500

    -that is, I know that for an amount of 10000 sales, employee 1 will get a Commission of 10000*.05 = 500. For example, 10000 (its sal) + 500 = 10500.

    (Q5) The thought that the above is correct?

    (11) "TEARDOOWN SPECIFY": give nothing.

    (12) my unit test is created.

    (13.) I run now by clicking on the button of the beetle, to the left of the green arrow. Unit test is run.

    (14) now in my table a.emps, 1 salary has increased to 10 500, and the diag test case, I get the "execution results: SUCCEED.

    (15) now, I run the unit test again.

    (16.) salary 'EMP' table emp 1 is passed to 11000 (which is correct) and the so-called execution results "SUCCESS".

    (Q6)  My question is: the query I gave for validation, SELECT count (*) FROM EMP WHERE empid = 1 AND = 10500 salary, now gives 0. so, this means that no row is returned for this condition and so the test must FAIL. But how is SQL * Developer said that the test was SUCCESSFUL. How does this system of validation?

    (17.) I went through the tutorial, but I do not understand these concepts >

    (Q7) What is the purpose of disassembly? I undersand the option 'drop table' "disassembly", where you drop the temporary table, but I do not understand the others, 'Table or line restore' and 'code pl/sql user '?

    (Q8) WHAT IS the advantage of making the test like this? Can I use an Excel spreadsheet and make dozens of unit tests faster than this method?  It is easy to understand too. This method is complicated.

    Your answers and your advice would be greatly appreciated.

    The temporary table to hold the original values for EMP. After the test runs, you must configure the disassembly to reset the return values of the temporary for the next time table that the test works again, he has values of expected start.

  • PL/SQL, used in application of the APEX of unit tests

    question by my client:

    I develop an Oracle Application Express application and work on unit tests for stored procedures in PL/SQL and the packages that are stored in the underlying database and used by the application of the APEX. These unit tests must run in the context of SQL Developer Unit Test.
    The problem is that the PL/SQL code stored in the database using functions such as NV('APPLICATION_ITEM') to access items in the application of the apex. They do return all values when I try to execute the PL/SQL within the unit test framework, that is to say in the backend. While it is good that the NV is not error, NULL haven't really work well in my scenario either (for example when the result of this function is inserted into a column NOT NULL in a table). I can think of a few workarounds, such as the creation of my own function NV within the schema to test return values desirable, but nothing seems a really satisfactory solution. I wonder if there is no recommendation to Oracle for this scenario - how can I run code that uses the APEX via backend-specific features. I found nothing in the documentation of the APEX for this but I would like to know if there is a recommendation how to better deal with this case.

    I use SQL Developer version 4.0.0.13.80

    Hello

    Indeed, you must set your PL/SQL function calls. This would be the cleanest solution.

    There is an alternative. Please see the following article on the creation of an APEX in PL/SQL session: Martin Giffy D'Souza on Oracle APEX: how to create a Session of the APEX in PL/SQL

    This approach allows to set the values of APEX application item before you run your unit tests. I don't know if it's possible in SQL Developer Unit Test, but it might get you further down the road.

    Good luck

    Nick

  • Unit testing and Version control tool

    Hi all

    We try to evaluate a PL/SQL developer tool that will have the following options.

    1. version Control (Control Version TFS or Subversion server)
    2. unit tests


    I see two options

    1 Developer SQL
    2 TOAD + Quest Code tester for Oracle

    Some you will suggest which option to go for and why?

    Also can we use JDeveloper or any other for this purpose?

    Please notify.

    Kind regards
    Hari

    It is somewhat a generic question.

    different tools have benefits different and different tools suit different companies and how projects that are managed or how the development is made etc..

    Some people may prefer to use these tools just for the development of the code, but for example use the CCS for source code management and version control, then develop their own unit test scripts, or have dedicated 3rd party tools in order to test the individual unit, business, test system etc. of test cases.

    Without knowing your company's configuration and requirements in detail, it would be difficult to say that one thing is better than the other in most cases.

  • Unit Testing C++ plug-ins

    Hello

    This can be an incredibly stupid question, because I'm not terribly famous (I used JUnit test before and that's all).

    I wrote a plug-in for Acrobat X Pro in C++ using Visual Studio 2010 and would like to know if it is possible to use to exercise my unit tests code.

    I think it should be a non-standard method of doing a suite of tests from the plugin must operate within acrobat (as opposed to being autonomous) in order to work or have data, functions, parameters, return values, no sense at all.

    I think that this could be done by exposing my profile in OLE automation or whatever that would allow an external program control my plug-in.

    Any ideas?

    Thank you.

    You could certainly integrate with all of the different unit tests

    frames BUT you must write the code that 'start' as

    well within your plugin and provide the user API to do.

  • How to check using unit tests

    Hello

    How can we test using ASMocking unit if an event is called and the next screen is displayed

    I use tools

    ASMOCK

    FlexUnit 4

    Praveen,

    A few questions. First of all, it is a forum of FlexUnit, so I don't know how to help you with questions of ASMock. You can certainly post here, but I don't know that you will get a response. You will probably need to reach out in an ASMock forum or site to help.

    Second, I'm not sure that FlexUnit is the right tool for you. It is a framework, which means testing a single unit... usually a class isolated both unit tests. If you want to see that when an event is dispatched a new screen, you see dozens to hundreds of classes depending on whether your project is ActionScript or Flex-based.

    If this is the type of test you want just be sure that you really want to try to do this in a framework of unit tests. It will be much more difficult and probably not meet your needs as well. If you need other tests to that high of a level, I would consider more than one tool of functional such as FlexMonkey or many tests

    Mike

  • Control of canoe of unit tests in LabVIEW on ActiveX

    Hello

    I want to run the unit tests of canoe in LabVIEW using ActiveX.

    EnvVars and sysVars in canoe handling was not a big deal, and there are plenty of examples here.

    But the unit tests of handling is quite difficult. Canoe help file shows this way in the object hierarchy:

    I solved the problem with the help of vector Support. They sent me the following c# example:

                MApp CANoe.Application = new CANoe.Application ();
    CANoe.Configuration mConf = (CANoe.Configuration) mApp.Configuration;
    CANoe.TestSetup mTestSetup = (CANoe.TestSetup) mConf.TestSetup; Test settings window
    CANoe.TestEnvironments mTestEnvs = (CANoe.TestEnvironments) mTestSetup.TestEnvironments;
    CANoe.TestEnvironment mTestEnv = (CANoe.TestEnvironment) mTestEnvs [1]; Test environment (file *.tse)
    Console.WriteLine ("Name" + mTestEnv.Name);

    CANoe.TestSetupFolders mTestSetupFolders = (CANoe.TestSetupFolders) mTestEnv.Folders;
    CANoe.TSTestModule mTSTestmodule = (CANoe.TSTestModule) mTestEnv.TestModules [1];
    Console.WriteLine ("Name" + mTSTestmodule.Name);

    CANoe.TestSequence mTestSequence = (CANoe.TestSequence) mTSTestmodule.Sequence;
    Console.WriteLine ("Count TestSequence" + mTestSequence.Count);
    CANoe.TestCase mTestCase = (CANoe.TestCase) mTestSequence [1];
    Console.WriteLine ("Name of Testcase" + mTestCase.Name);
    mTestCase.Enabled = false; disable the unit test - XML and structured NET only module.

    CANoe.TestReport mTestReport = (CANoe.TestReport) mTSTestmodule.Report; Access to the report

    CANoe.Measurement mMeasurement = (CANoe.Measurement) mApp.Measurement;
    If (! mMeasurement.Running)
    mMeasurement.Start ();

    mTSTestmodule.Start ();

    I realized that you can cast the ActiveX object references to another class of the child in the following way:

    It was the right solution and I want to share with you.

  • How can I unit test screws with classes?

    I have my first VI using an oriented object approach I want to unit test. How in the world I have configure Unit Test infrastructure to accept a specific class? See the attached excerpt.

    Hi elrathia,.

    Here is a link that should help you:

    http://zone.NI.com/reference/en-XX/help/372584D-01/lvutfconcepts/utfc_tests_cases/

    Below, you can see an example location:

    labview\examples\Unit Test Framework\LabVIEW Class\LV Class.lvproj

    (Note this is for 2012)

    DylanC

Maybe you are looking for

  • How to install Win 2000 form a USB CD on a protected 3440CT

    I have a 3440CT protected and are in need of repair/install Windows 2000 on a CD. I have the 4 game Win2k boot disk and can boot from USB FDD. The CD player is also a USB port that is connected via the port replicator, but he never saw also available

  • System update was not able to connect

    I bought a phone like 3 days ago and I tried to update the phone, I tried to update system to 1.32.24 but they say "the attempt to upgrade has encountered an error because of the failure, connect" I did factory data reset like 3 times and still works

  • Pencil and Bluetooth headset

    I'm having some trouble with my Apple pencil and list of music with bluetooth headphones. When I draw sketches of Adobe, or similar application in http://bit.ly/joc0zm, then the pencil pressure data seems to be screwed up when the music plays. If I d

  • Canon printer this print spooler problem

    I have a printer canon set up a network for the last 12 months without a problem.  Today, when I press print, the document goes to the spooler, but does not print.  Only when I restart the computer will display the items.  All other computers on the

  • By e-mail to a specific address of my system cannot with other systems.

    MY EMAIL NO SE NOT JUST TO AN INDIVIDUAL COMPANY IF I SEND IT TO MY LAPTOP USING USING MY MOBILE ME GIVES A DISORDER WHEN SENDING EMAILS TO A COMPANY. HE DIDN'T THERE OF NO PROBLEM AT ALL WITH THE REST OF THE CONTACTS. I USED LAPTOP MY SON AND EMAIL