Problem with Unit Test

What I am doing wrong?

I created a small example of how to test the functionality of substitution of variables within the unit test framework.

Documentation: SQL Developer: unit tests

create or replace procedure SimpleTestProcedure (param1 in varchar2) as

Start

null;

end SimpleTestProcedure;

/

Test configuration with the following configuration:

Input value: Test

Process: Boolean function

declare

Param varchar2 (4 char);

Start

param: =: param1;

If "{param1}"! = param then

Returns false;

end if;

end;

UnitTestScreenshot.png

Is found in the following message is displayed after the test run:

UnitTestMessageScreenshot.png

I use SQL Developer Version 4.0.3.16.

Any help would be appreciated!

Kind regards.

Hi Flofe,

It looks like the Boolean function as a validation of process takes no parameters that a function pl/sql 'generic' put... it's probably called "function" only because it returns a value, as does any function. But you can use substitutions of setting the parameters for the stored procedure that you are testing, which you are already doing.

So, try to change your code to:

declare

Param varchar2 (8);

Start

param: = "{param1}";

If "{param1}"! = param then

Returns false;

on the other

Returns true;

end if;

end;

And it should work for try you the little test...

I hope this helps...

Val

Tags: Database

Similar Questions

  • problem with loopback test base with NOR-6008

    I recently started to use DAQmx in c# .NET 4.0 with NOR-6008 USB DAQ. I tried a loopback test by connecting output to an analog input analog and tried readign the signal from the output to the entrance but did not send the signal (or maybe a problem with the code). The analog input readign reads a random value rather than the value entered by the user for the output. I connected ao0 and ai3 on data acquisition. Here's the code.

    private void button1_Click (object sender, EventArgs e)

    {

    Task analogOutTask = newTask();

    AOChannel myAOChannel = analogOutTask.AOChannels.CreateVoltageChannel ("Dev1/ao0", "myAOChannel", 0, 5, AOVoltageUnits.Volts);

    AnalogSingleChannelWriter writer = newAnalogSingleChannelWriter (analogOutTask.Stream);

    Double analogDataOut;

    analogDataOut = Convert.ToDouble (AnalogOut.Text);

    writer. WriteSingleSample (analogDataOut, true);

    }

    Private Sub button2_Click (ByVal sender As Object, EventArgs e)

    {

    Task analogInTask = newTask();

    AIChannel myAIChannel = analogInTask.AIChannels.CreateVoltageChannel ("Dev1/ai3", "myAIChannel", AITerminalConfiguration.Differential, 0, 5, AIVoltageUnits.Volts);

    AnalogSingleChannelReader reader = newAnalogSingleChannelReader (analogInTask.Stream);

    Double analogDataIn is reader. ReadSingleSample();

    AnalogIn.Text = analogDataIn.ToString ();

    }

    Hello

    I built an application using your code (with task.verify) and it works beautifully.

    Have you tried different channels of inputs/outputs?

    Curt

  • Reproducible bug, leading to results SOME bad (with unit test)

    Hi all

    Please see this test unit http://jumpshare.com/b/Y7naM9 (sorry, not possible to attach files here).
    What I get is the following. As you can see the result is different to SELECT EVEN though I created the two indices. This is definitely a serious error!

    The implementation plans for the two selects are:
    (1) without a clue: http://i.imgur.com/uCLoc.png
    (2) with indices: http://i.imgur.com/RNruC.png
    BANNER                                                                         
    --------------------------------------------------------------------------------
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production              
    PL/SQL Release 11.2.0.2.0 - Production                                           
    CORE     11.2.0.2.0     Production                                                         
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production                          
    NLSRTL Version 11.2.0.2.0 - Production                                           
    
    view V dropped.
    table T dropped.
    materialized view MV dropped.
    table C dropped.
    table C created.
    1 rows inserted.
    table T created.
    1 rows inserted.
    1 rows inserted.
    1 rows inserted.
    1 rows inserted.
    1 rows inserted.
    1 rows inserted.
    1 rows inserted.
    1 rows inserted.
    1 rows inserted.
    .........many rows
    committed.
    materialized view MV created.
    view V created.
      COUNT(*)
    ----------
           190 
     
    index MV_ZIPCODE_ZIPCODE created.
    index MV_ZIPCODE_LOCALITY_COUNTRY created.
      COUNT(*)
    ----------
             0
    Could you please say what's not here?

    Thank you
    Blama

    Published by: Laurent January 9, 2013 15:25

    Yes, I can reproduce it on 11.2.0.2.0:

    SQL> SELECT banner FROM v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for HPUX: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    
    SQL> DROP VIEW V;
    DROP VIEW V
    *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    
    SQL> DROP TABLE T;
    DROP TABLE T
               *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    
    SQL> DROP TABLE C;
    DROP TABLE C
               *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    
    SQL>
    SQL> CREATE TABLE C
      2     ( ID NUMBER(*,0),
      3   SHORTNAME_DE VARCHAR2(40 CHAR)); 
    
    Table created.
    
    SQL> INSERT INTO C (ID,SHORTNAME_DE) values (1,'d');
    
    1 row created.
    
    SQL>
    SQL> CREATE TABLE T
      2     ( ZIP_CODE VARCHAR2(10 BYTE),
      3   COUNTRY VARCHAR2(100 BYTE),
      4   LOCALITY VARCHAR2(100 BYTE),
      5   SUB_LOCALITY VARCHAR2(100 BYTE)
      6  );
    
    Table created.
    
    SQL>
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('01','d','AA',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('02','d','BB',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('03','d','CC',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('04','d','DD',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('05','d','EE',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('06','d','FF',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('07','d','GG',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('08','d','HH',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('09','d','II',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('10','d','JJ',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('11','d','KK',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('12','d','LL',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('13','d','MM',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('14','d','NN',null);
    
    1 row created.
    
    SQL> Insert into T (ZIP_CODE,COUNTRY,LOCALITY,SUB_LOCALITY) values ('15','d','OO',null);
    
    1 row created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    15 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    30 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    60 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    120 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    240 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    480 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    960 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    1920 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    3840 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    7680 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    15360 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    30720 rows created.
    
    SQL> INSERT INTO T SELECT * FROM T;
    
    61440 rows created.
    
    SQL> COMMIT;
    
    Commit complete.
    
    SQL>
    SQL> CREATE OR REPLACE VIEW v AS
      2    SELECT c.id      AS country_id,
      3    c.shortname_de AS country_shortname_de,
      4    t.zip_code   AS zipcode,
      5    NVL(t.locality, t.sub_locality) ortsvorschlag
      6  FROM t
      7  LEFT OUTER JOIN c
      8  ON t.country = c.shortname_de
      9      WITH READ ONLY;
    
    View created.
    
    SQL>
    SQL> SELECT COUNT(*) FROM v WHERE
      2      (
      3      ZIPCODE LIKE 'B%' ESCAPE'\'
      4      AND ZIPCODE IS NOT NULL
      5      )
      6      OR
      7      (
      8      ORTSVORSCHLAG like 'B%'
      9      AND ORTSVORSCHLAG IS NOT NULL
     10      )
     11      ;
    
      COUNT(*)
    ----------
          8192
    
    SQL>
    SQL>  CREATE INDEX t_zipcode_zipcode ON t
      2      (zip_code
      3      ) ;
    
    Index created.
    
    SQL>  CREATE INDEX t_zipcode_locality_country ON t
      2      (NVL(locality, sub_locality), country
      3      ) ;
    
    Index created.
    
    SQL> --DROP INDEX t_zipcode_zipcode;
    SQL> --DROP INDEX t_zipcode_locality_country;
    SQL>
    SQL> SELECT COUNT(*) FROM v WHERE
      2      (
      3      ZIPCODE LIKE 'B%' ESCAPE'\'
      4      AND ZIPCODE IS NOT NULL
      5      )
      6      OR
      7      (
      8      ORTSVORSCHLAG like 'B%'
      9      AND ORTSVORSCHLAG IS NOT NULL
     10      )
     11      ;
    
      COUNT(*)
    ----------
             0
    
    SQL> 
    

    And it's index t_zipcode_zipcode creating the issue. Looks like a bug, so search MetaLink or / and open SR.

    SY.

  • Problem with model tests

    I'm having a problem by creating a test template that ends with a simple blank slide that contains a box whose 'success' click action is to "send email to". As soon as I add such a box to click to the last blank slide, the slide is automatically placed in front of the slide of quiz results (instead of appearing at the end, as expected).

    Here are the steps I used to produce this unexpected result:

    (1) create a blank project.
    (2) insert a single question multiple choice slide. You should now have 3 water slides. 1 is a blank slide, 2nd is the master of cabin question slide and the 3rd is quiz results slide.
    (3) insert a blank slide AFTER THAT the quiz results slide (you now 4 slides).
    (4) the 4th slide, add a simple transparent text caption, as "email."
    (5) of the 4th slide, add a box whose 'success' click action is set to "send email to.
    (6) enter a valid email address, and click OK.

    Result: Slide 4 unexpectedly placed in front of the quiz results slide and Captivate does not allow me to slide this slide or the quiz results slide to restore order to the desired slide. If I now remove the click box in this slide, Captivate allows me to slide the blade through, but of course, I want the box click on continue.

    Question: If anyone can reproduce it, no clues as to why this is happening or how fix/work around it?

    Thank you very much!

    Hi CapManZ

    I did take the time to experiment with it, so what I am about to offer is somehow a "hip shooting". When you insert this box click object, before you click the OK button to validate, try clicking the reports tab and making sure that the option titled "Include in Quiz" is not selected. I believe that it is normally enabled by default and that's probably why slide's be repositioned, as the results would be too based on this slide.

    See you soon... Rick

  • Anyone having problems with sending test emails?

    During the last week, we seem to have issues when sending test emails... spins small hourglass and psins up to 5 minutes until the test is off... trying to figure out if this is a problem or something Eloqua...

    Hi Paul

    Our development team has been aware of this, and the gears are already in motion in order to continue the investigation and to solve them as soon as possible. Please log a case in the Support Portal, so you can be notified to the resolution.

    Kind regards

    Zainab

  • Problem with the tests

    Hi, I bought a year subscription on my mac. Installed and everything is ok. but on my pc if I install the product, I get only trial version (with the mac off and connected)... I know it's up to 2 computers, but I only have 2. Thank you

    Hello

    Yes, you can use it on 2 computers.

    Do not forget that you are connected to correct address under which you purchased membership.

    You can refer it, please-

    Connect and disconnect activate Cloud Creative applications

    Creative Cloud applications unexpectedly back in the test mode. CCM, CS6

    Applications creative Cloud back in test mode after an update until 2015 for CC

    See also-

    Solutions to connection errors, activation and connection with creative Cloud applications and Creative Suite

    Kind regards

    Sandrine

  • Problem with the Satellite A300D - 14 p

    Hi all!!

    I have problem with games Test drive Ultimate and Need for speed pro street, when I press the button run, don t car, when spending the same time, car will lead, then I run the button, but my car don't stop at the same time, then the car stops! When I play this games keyboard button will stick, but when I work or play other games, my laptop works properly!

    Maybe that's the problem of processor, and I need to update drivers...! What do you think?

    I look at my CP CPU load is 100% the two core, when I play this game!

  • 2.1.0.62: problem with Package.Functions and Unit Tests

    I like the new Sqldeveloper - I startet try Unit Tests as described here: link: [http://www.oracle.com/technology/obe/11gr2_db_prod/appdev/sqldev/sqldev_unit_test/sqldev_unit_test.htm#t4]

    He has worked with a test procedure. Now I'm testing my package functions, but all I get is the following:

    ---------
    Die Prozedur ausgeführt wurde following.

    Ausfuhrungsaufruf
    BEGIN
    : 1: = "PKG_MYPACK". "CREATEFUNCTION"(IN_PROGRAMMEID = >: 2,) "
    IN_AMOUNT = >: 3,.
    (IN_SWS = >: 4);
    END;

    Bind-variables verwendet
    1 WHOLE (NULL)
    INTEGER 2 IN 1
    INTEGER FROM 3 TO 10
    INTEGER 4 TO 11

    Ausfuhrungsergebnisse
    ERROR
    Ungultige conversion angefordert
    oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:439)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:7723)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7496)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7978)
    oracle.jdbc.driver.OracleCallableStatement.setObject(OracleCallableStatement.java:4063)
    oracle.jdbc.driver.OraclePreparedStatementWrapper.setObject(OraclePreparedStatementWrapper.java:221)
    oracle.dbtools.raptor.datatypes.strategies.callablestatement.CallableBindingDatum.customBindIN(CallableBindingDatum.java:135)
    Oracle. ...
    ------

    What can I do?

    Created
    Bug 8976245 - EA1: UNIT_TEST: CONVERSION not VALID ERROR with the HELP of the INTEGER PARAMETER
    and asked the answering machine of bug to keep you informed about the situation here in the forum.

    Bad news, it is that any INTEGER type parameter for which you specify a non-null value will fail.

    Possibly useful new, is that if you create a "clone" of you the function using NUMBER as the data type, you can continue to experiment how unit tests can be useful for you.

    Answer no sorry moment. :(

    Brian
    SQL development team

  • Distribution of the source - unit test dependency problem

    Hello

    I developed and API and I want to make the distribution of the sources, however my faulty build (error message is below) due to the error of reclassification of the Unit Test framework that I use to test my code. All Unit Tests are in the same folder, called "UnitTests", which is a part of a class. If I delete the UnitTests from the class folder, source distribution is created as expected. I try to put the folder always excluded UnitTests, but it does not help.

    I use LV 2012.

    Any ideas what I am doing wrong?

    Thank you

    Andrej

    Error message:

    LabVIEW does not find a file that is a dependency of a startup, exported or always included VI.

    File not found: the file "C:\Program Files (x 86) \National 2012\vi.lib\utf\dialogs\utf_defocus_trees.vi" must have the qualified name of "NI_UnitTestFramework.lvlib:utf_defocus_trees.vi", but it has the qualified name of "utf_defocus_trees.vi".

    The missing file can be referenced by one of the libraries included in the compilation or the file - CircularBuffer.lvlib. To resolve this problem:

    -Open all the startups, exported or always included live, recompile them (CTRL-SHIFT click the Run arrow) and keep them to update their dependencies.
    -Open libraries included in the building and check the existence and the location of the referenced files. Also, try building with the option of additional exclusion, 'Delete unused library of the project members', verified.

    Is attached to a fixed version of utf_defocus_trees.vi.  Place it in your \LabVIEW 2012\vi.lib\utf\dialogs directory .

    In addition, you might want to load/save utf_test_properties_sub.vi to get rid of the dirty dot.  This VI is located in the: \LabVIEW 2012\resource\framework\providers\utf.

  • Photosmart plus 209: problem with compatible ink cartridge after moving to France UNITED Arab Emirates

    I have a Photosmart B209 more and you just moved from the Arab Emirates UNITED to the France. In the style of France the 178 HP, designed for that printer ink cartridge is not available, and it seems that the cartridge HP 364 in France is the same size and adapts to the machine but wil lnot work. I get a message on the printer saying incompatible cartridge. I saw a post about this problem with instructions to contact HP and get a kind of rearmament of the country. I wasn't able to do that. Can someone help with this problem?

    You will need to Contact HP to ask a "regionalization Reset." Do not charge for this, it is covered under the warranty of the cartridge. You will need to have access to your computer and printer then on line with HP. You will also need to have a set of cartridges for the new region, once completed reset cartridges of region of origin no longer works.  Webpage of HP on the subject is here.

  • I intend to buy a Apple Watch in the United States, but I have a European iPhone 6 Plus. Anyone know if I have a problem with syncing my iPhone (EU) and the Apple Watch (US)? I think not, but any ideas?

    I intend to buy a Apple Watch, United States of America, but I own a European iPhone 6 Plus device. Anyone know if I have a problem with the sync between devices? I don't think, but it would be more useful to have a definite answer for this as my assumption...

    Hi John

    The devices normally work together.

    There is no difference in the hardware specifications for the watch. It can be configured to use your preferred language and format of the region.

    Adapter USB power to the watch will be located in the United States. To charge your watch via food in Europe, you can use the magnetic charge cable supplied together with a real 5W Apple (iPhone) or 12W (iPad) adapter USB power (or with a third party, Apple certified adapter).

  • Problems with the Guide of TV Media Centre in the United Kingdom for the new year?

    Since midnight January 1, no data are available for any channel in the guide, even though it says that it has successfully downloaded the latest announcements of guide. Does anyone else have this problem?

    I tried a new analysis for the services and set up the guide even once.
    P

    Hello PGreenhill,

    Please see the thread below because there was a problem with the program guide in the United Kingdom and Ireland. It must be corrected. If not, let us know.
    http://answers.Microsoft.com/en-us/Windows/Forum/windows_8-Winapps/the-electronic-program-guide-EPG-for-Windows-Media/923cf081-0607-497d-889c-6424e8299213

    Check also that all your Windows updates are up-to-date.

    Thank you

    Marilyn

  • How can you unit test documents created with LiveCycle Designer?

    Hello

    The preparation of the documents that contain forms dynamic (programmed in Javascript), which is a good way to test?

    Do you perform manual or automatic testing? If the latter, what technique do you use?

    Thank you!

    Hello

    I wrote a script Jasmine to run unit tests, there is an example of it here XDP form, Adobe LiveCycle Designer by BR001 Cookbooks: using the test framework Jasmine in a form in LiveCycle Designer Adobe

    Adobe labs has the Adobe PDF Test Toolkit but I have no experience with it, memory, software depended on it was quite expensive, Adobe PDF Test Toolkit - Adobe Labs

    Concerning

    Bruce

  • Need of XLSX files tested to see if there is a problem with the content library

    Hello

    I have a file which causes an error when you use the library of Stellent. The file is a file XLSX and when we open and then save the file again, then does not cause the error. This leads me to believe that the file has been successfully created or something wrong with the library. More than likely it is the file. Is there any tool that I can use to test the file that will tell me what exactly is the problem? The file is automatically generated by a survey company. And so if we can show a problem with the file itself, then they will have to solve the problem in their autogenerator.

    Thank you
    Larry

    Published by: 1000345 on April 16, 2013 06:44

    Published by: 1000345 on April 16, 2013 06:45

    Published by: 1000345 on April 16, 2013 07:00

    Published by: 1000345 on April 16, 2013 07:00

    Which, in my view, that we use it for is to get out of text or metadata files to create an index on the data.

    Yes, it's also OutsideIn. I believe you can use the SDK to export research.

    If I were you, I'd do some testing base of the new version and it doesn't help, create a service request in Metalink so that management can take a peek inside.

  • Updated to Lion - problems with the mode of the unit

    I've recently updated my iMac - 8 GB ram, 1 TB hd - manufactured 2010.

    I had a VM for pre-existing (Win XP Pro) that I had left my PC.  Although very well, I can use the virtual machine in stop mode, the unit was very buggy.  I lost control of the mouse, the screen redraws is a problem and copy / paste between the VM and the Lion are incompatible.

    I've upgraded to the latest version of VMware 3.1.13 - (sorry if this isn't the correct version number - but I've upgraded).

    Has anyone else had problems with the mode of the unit?

    VMWare has been notified of this issue and if so, is there no work around?

    Thanks for any help on this.

    You reinstall your VMware tools after upgrade to 3.1.3 Fusion?

    Go to the menu of Fusion, the Virtual Machine-> install VMware Tools, after completing the installation, restart your guest and see if the unit is very well.

Maybe you are looking for

  • Satellite L300D - how to restore factory default and USB key?

    Hello I need urgent help. I got an error on my laptop and I lost my recovery disc, so I borrowed a friends disk by mistake. I deleted the partion that everything has been installed on.Can someone please help urgently? I have all my files on a USB key

  • z ^ n-1 delay

    Please help me, I am struck here. On the attached photo, I circled a tool that is mentioned in my documents as a delay that "converted to integer value must evade from its own deferred value" I could not find this tool in labview, really, I spent a l

  • Virus SEV 2012-1889

    How to remove the virus SEV 2012 - 1889

  • I have windows xp professional I can't play file video avi in windows media Player

    Hi dear, I can't read the file video avi in windows media player

  • PeopleSoft service hung on starting

    Hi allFSCM90 and 8.49 MS SQL server tools,I have the following in the Windows event log:Event ID: 7022PeopleSoft \FSCM90PT84920SQL service hung on startingAnd in tuxedolog:CMDTUX_CAT:827: ER - ROR: fatal error occurred; launch the user error handlerA