Unit testing - problems using £ sign

Sorry if this has come up before...
We're using the SQL Developer unit testing functionality in what we thought was a fairly straightforward manner.
We use a startup to set up some data, run a procedure with specific values for the inputs, compare the outputs with expected values, and then use a teardown to remove the data.
All works well except for one output field. For reasons I won't bother to go into, it's a varchar2 field that returns an amount, in the format £9.99 - i.e. with a UK pound (£) sign at the start of the string.
Whenever I try and input an expected value including the pound sign, the whole value gets converted to null - so, £9.50 gets saved as an expected value of null, which then, of course, causes the test to fail (unless we set it to ignore the value which somewhat defeats the point of testing !)
Playing around a little, it seems that characters such as $ and # are ok, but any string that uses £ anywhere within it (e.g. 876f£ffe) gets saved as null.
Has anyone else encountered this or have a workaround/fix ?
(SQL Developer version 3.2.20.09, running on Windows XP 32-bit)

Have you tried opening a new browser window as the new user? That is:
1. Hold Shift and right click IE shortcut
2. Select Run as different user
3. Enter the new user's credentials
4. Browse to the SharePoint site
Jason Warren
@jaspnwarren
jasonwarren.ca
habaneroconsulting.com/Insights

Similar Messages

  • Unit Test code using wrong persistence unit

    In the midst of learning Maven, I created a simple application in which I am using JPA (Java Persistence 1.0.2) with EclipseLink implementation (2.0.2).
    Note: This is an Application Managed environment. So I manually control EntityManager's life cycle.
    The persistence.xml file used by the main source code is different from the one that unit test code uses. Main code uses an Oracle DB and the test code uses an in-memory Derby.
    Running unit tests was updating the Oracle DB (!) and I eventually managed to fix that by using two different persistence-units in the XML files.
    However, I don't understand why that fixed the problem. I manually create and shut down the entity managers and they are not running concurrently. I'm pretty sure Maven (or the way I set it up) doesn't mess up the resources (XML files). In fact by looking at Maven's debug output I can see it's using the right XML file for unit tests.
    Could someone enlighten me, please?

    Do you have both persistence.xml files on your classpath? If so, and they contain the same name for their respective persistence units, you should be getting a warning or error since they must have unique names. There is no way to tell which one you want to access otherwise.
    Best Regards,
    Chris

  • ABAP Unit Test Problem

    Here we go again on questions regarding ABAPUnit.  We are trying to use Abap unit within a Class object.  All the examples we have seen have to do with Classes and Methods within a Report program. 
    What we have created:
    Class: ZCL_MAIN
    Type: General Class
    Method:  test_abapunit
    Class: ZCL_MAIN_TEST
    Class type: Abap Unit
    Sub Class of ZCL_MAIN
    Method: Test_abapunit_test 
    We try and run the Abap Unit Test from the Test Class and it says it is complete but does not execute our code.  I know we are doing something wrong but are stumped as to what it is.
    Glenn

    Hi Glenn,
    although Uwe and Klaus actually provided for the relevant information we too faced some difficulties at first understanding 'where' you actually put the test classes. So here are the mechanics:
    Open SE80 or SE24 and implement your class ZCL_MAIN.
    While this class is opened, choose <i>Goto->Class-local types->Local Class Definitions/Types</i> from the menu. An editor for local classes is opened on the right.
    Type in your class definition ZCL_MAIN_TEST like this:
    CLASS lcl_main_test DEFINITION FOR TESTING.
      "#AU Risk_Level Harmless
      PRIVATE SECTION.
        CONSTANTS: some_initial_test_value TYPE i VALUE 5.
        DATA: main_class TYPE REF TO zcl_main.
        METHODS setup     FOR TESTING.
        METHODS teardown  FOR TESTING.
        METHODS check_get_my_int FOR TESTING.
        METHODS check_.. FOR TESTING.
    ENDCLASS.
    This is btw a 'normal' local class, no subclass of cl_abap_unit.. whatsoever.
    Go back (menu <i>Goto->Class Definition</i>).
    Choose <i>Goto->Class-local types->local class implementations</i> from the menu.
    Type in your class implementation for ZCL_MAIN_TEST, i.e. implement especially the setup()-method for the test fixture and the various test-methods.
    Compile/activate your class ZCL_MAIN.
    Run the test by choosing <i>Test->Unit Test</i> from the context menu of the class ZCL_MAIN.
    Hope this helps, regards,
    Sebastian

  • Unit test cases using sqldeveloper2.1.1

    hi,
    currently i am using sqldeveloper1.5.1. Using this version i am not able to write unit test cases.
    i need to write unit test cases which is possible using sqldeveloper2.1.1.
    can i connect my oracle database using sqldeveloper2.1.1. oracle version information as follows
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi.
    please suggest which sqldeveloper zip file is suitable for this.

    whatever unit testcases we can write for a procedure using sqldeveloper2.1.1.
    can it be executed in sqlplus environment.
    or it needs sqldevelopertool only to execute these testcases.

  • ABAP Unit, how to use

    Hi,
    I created a small example of testing using ABAP Unit shown below.
    But i get a syntax error in German, i translated to English and this is what i get
    The reference to a test class (marking with FOR TESTING) is only in test classes possible
    How do i resolve this?
    CLASS myclass DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA text TYPE string.
        CLASS-METHODS set_text_to_x.
    ENDCLASS.
    CLASS myclass IMPLEMENTATION.
      METHOD set_text_to_x.
        text = 'U'.
      ENDMETHOD.
    ENDCLASS.
    Test classes
    CLASS mytest DEFINITION FOR TESTING.
      PRIVATE SECTION.
        METHODS mytest FOR TESTING.
    ENDCLASS.
    CLASS mytest IMPLEMENTATION .
      METHOD mytest  .
        myclass=>set_text_to_x( ).
        cl_aunit_assert=>assert_equals( act = myclass=>text
                                        exp = 'X'
                                        msg = 'failed').
      ENDMETHOD.
    ENDCLASS.
    DATA my_ref TYPE REF TO mytest.
    CREATE OBJECT my_ref type mytest.
    call METHOD my_ref->mytest.

    You're almost there. You don't need to create a object reference to your ABAP Unit Test class. To run the ABAP Unit test, you need to do the Program > Test > Unit Test
    CLASS myclass DEFINITION.
    PUBLIC SECTION.
    CLASS-DATA text TYPE string.
    CLASS-METHODS set_text_to_x.
    ENDCLASS.
    CLASS myclass IMPLEMENTATION.
    METHOD set_text_to_x.
    text = 'U'.
    ENDMETHOD.
    ENDCLASS.
    * Test classes
    CLASS mytest DEFINITION FOR TESTING.
    PRIVATE SECTION.
    METHODS mytest FOR TESTING.
    ENDCLASS.
    CLASS mytest IMPLEMENTATION .
    METHOD mytest .
    myclass=>set_text_to_x( ).
    cl_aunit_assert=>assert_equals( act = myclass=>text
    exp = 'X'
    msg = 'failed').
    ENDMETHOD.
    ENDCLASS.
    Check thread Unit Test Problem
    Regards,
    Naimesh Patel

  • Running Unit Test from test manager that run bat file from command line

    Hi ,
    I am trying to run Jsystem (java framewotk) from command line using runScenario.bat thru unit test that i associated to test in test manager.
    the idea is that when i ran the automated test  from MTM - it will run the the unit test that will run the appropriate test case in java.
    i wrote the code like this : 
    using System;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    namespace UnitTestProject3
    [TestClass]
    public class UnitTest1
    [TestMethod]
    public void TestMethod1()
    try
    String command = "c:\\JSYSTEM\\runner\\runScenario.bat
    c:\\Users\\ryeshua\\Source\\Workspaces\\Auto1\\my-tests-project\\target\\classes scenarios\\feature1 RoeySetup.xml ";
    System.Diagnostics.ProcessStartInfo procStartInfo =
    new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);
    procStartInfo.RedirectStandardOutput = true;
    procStartInfo.UseShellExecute = false;
    //procStartInfo.CreateNoWindow = true;
    System.Diagnostics.Process proc = new System.Diagnostics.Process();
    proc.StartInfo = procStartInfo;
    proc.Start();
    string result = proc.StandardOutput.ReadToEnd();
    Console.WriteLine(result);
    catch (Exception objException)
    // Log the exception
    and when i ran it from visual studio it worked perfect. and update  the Jsystem logs of the junit test in the jsystem/runner/log folder.
    but when i added it to associated test and ran it from MTM - it pass but it does not update  the logs in jsystem folder.
    the problem that i dont know what is not working. i cant see the output of it when i ran from mtm but can see when i ran from VS.
    i am using VS 2013 Pro with MTM 2013.
    please advice
    Roey

    Hi Roey,
    Thank you for posting in MSDN forum.
    Based on your issue, could you please tell me how you generate the log file under the jsystem folder?
    Generally, I know that when we run unit test from VS IDE, the file will be saved into the local machine. But when we run unit test from MTM, the unit test method will be run on the test agent machine, so the file will be saved into the test agent machine.
    Therefore, I suggest you could check if you did not see the updated logs file in jsystem folder on the test agent machine.
    In addition, I suggest you could try to copy this unit test project on this test agent machine and then run the unit test method using mstest.exe in command line and then check if you can update the logs file.
    https://msdn.microsoft.com/en-us/library/ms182489.aspx?f=255&MSPPError=-2147217396
    If you have any updated message about this issue, please tell me.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SQL Server Unit Tests

    Hi SQL Server Experts,
    About SQL Server Unit Tests (vide
    http://msdn.microsoft.com/en-us/library/jj851203(v=vs.103).aspx), please help with inputs on pros and cons of SQL Server Unit Tests. Any ideal recommendation?
    Thanks

    Blog on the topic: "Database unit testing is used for feature testing of your individual modules (stored procedures, triggers or user defined functions) that is to say your module performs as expected.  Apart from that, it is also used to ensure that
    subsequent changes to the module does not break any functionality.
    At first glace, it looks like this would add overhead to create vs. doing adhoc testing, but Visual Studio lets you automatically generate T-SQL code stubs to test the database object which you can customize as per your need.
    Visual Studio provides Database Unit Test Designer which you can write/define T-SQL scripts (also insert SQL assertion in this code) that calls your module and then evaluates the execution result against the different test conditions which indicates your
    modules execution success or failure."
    LINK:
    SQL Server Unit Testing with Visual Studio 2010
    >Please pardon my ignorance as I am coming back to SQL Server after a brief gap.
    You may have to brush up with T-SQL prior to using a sophisticated tool like this:
    http://www.sqlusa.com/bestpractices/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Selenium Unit Tests / NWDI

    Hello,
    I've recently read the article:
    HUDSON USAGE IN AN NWDI BASED ENVIRONMENT
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60d4fb24-b062-2e10-55b5-d8488b216af8]
    I was interested in the unit test tool used called Selenium, has anyone got experience of using this tool for Web Dynpro built apps? I have downloaded the Selenium Firefox plugin to record the unit tests however when this tool is used for Web Dynpro Apps the right click option has been disabled.
    Is there anyway to allow this right click? There are a number of Selenium unit test features under this right click option to help quickly build unit tests. i.e asserts
    If anyone else has used Selenium to create unit tests in WDJ, have you used a different approach to the Firefox plugin?
    Thanks in advance!
    Jon

    Dear All,
    I am trying to use Selenium for Recording DynPro web pages, I am able to record successfuly, but I am unable to play it properly.
    Selenium Tool is unable to write entries in Text Fields.
    Any body having any idea about the issue, Please Help.
    Thanking You All.

  • How can i test the MaskedTextBox in Unit Testing?

    Hi,
        I am develop one sample, in this i am using MaskedTextBox. Now i want to assign value and test that value. How can i assign value and test that?
    Regards,
    Bhadram.

    Hi Bhadram,
    Unit test is used for class methods, for the UI control test, I feel that the coded UI test would be better.
    >>How can i assign value and test that?
    You could use the Keyboard.SendKeys()
    method to input the value.
    Reference:
    https://social.msdn.microsoft.com/Forums/en-US/05b6887c-e0ac-4b9d-8c23-ff913594f2ab/masked-textbox-issue-in-codedui?forum=vsautotest
    To test the value, you could use the Assert.AreEqual method.
    https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.assert.areequal.aspx
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Where should I put my extended unit test assemblies for Visual Studio 2013?

    Hi, I have a question about M/S Unit test extension.
    1. My purpose
    I'm trying to extend Visual Studio Unit Test.
    The points where I extends unit test is to output detail logs.
    My development environment is as follows.
    OS: Windows 8.1Pro (64bit version)
    IDE: Microsoft Visual Studio Professional 2013
      (Version 12.0.30723.00 Update 3)
    2. Things which I'd like to know
    To enable my test extension, it is required to put my test extension assemblies into designated sub folder under Visual Studio's installed folder.
    The source of this information is MS developers blog below.
    (http://blogs.msdn.com/b/vstsqualitytools/archive/2009/09/04/extending-the-visual-studio-unit-test-type-part-1.aspx)
    Q1. It's required to put the assemblies bellow.
    C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies
    Howerver, the guidance in the blog is for Visual Studio 2010.
    In Visual Studio2013, above "PrivateAssemblies" could not be found under "\Microsoft Visual Studio 12.0\Common7\IDE" folder.
    Where should I put my assemblies for my 2013. Is there any substitution for "\PrivateAssembly" folder?
    Q2. Another requirement is to set Assembly information entry into the registry below.
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\EnterpriseTools\QualityTools\TestTypes\{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}\TestTypeExtensions
    For Visual Studio 2013, I could find almost the same node hierarchy, but
    could not find the last "TestTypeExtention" node. Instead,
    I could find "Extensions" node.
    Should I write registry entry here? Or, should I make a new "TestTypeExtension" node and write the entry there?
    Q3.Last question is more basic question.
    Is there any way to kick extended test program in Visual Studio 2013's Test Explore
    without registering my assemblies in the way recommended above.
    I think it's much tender for developer's in debugging phase. For example,
    it is very much helpful, if I could kick a unit test which uses my extended test class in the unit test extension solution.
    That's all. Any information concerning this topics will be appreciated.

    Hi TrailRunner-MF,
    One possible reason is that you didn't view the correct folder, for example, in my windows 8.1 64 bit, it is in the path: "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE", not the "C:\Program Files\Microsoft Visual Studio
    12.0\Common7\IDE " folder.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Mocking Oracle database in unit-tests

    In need to write unit tests that uses old node-oracle library and I am looking for options to run tests w/o real database.
    Is there in-memory fake database implementations (such as mockcouch for CouchDB or TingoDB for MongoDB)?
    Is there real world success stories to use Sinon.Js to mock database?
    Should I now rewrite modules to use with current supported library to make this 2 options available or better/simpler implemented?
    Should I not write unit-tests now and wait until options 1) and 2) available are?

    In need to write unit tests that uses old node-oracle library and I am looking for options to run tests w/o real database.
    Is there in-memory fake database implementations (such as mockcouch for CouchDB or TingoDB for MongoDB)?
    Is there real world success stories to use Sinon.Js to mock database?
    Should I now rewrite modules to use with current supported library to make this 2 options available or better/simpler implemented?
    Should I not write unit-tests now and wait until options 1) and 2) available are?

  • Abt unit  test plan

    hi
    can u plz explain abt unit test planning?
    es

    hi bramara,
    Unit testing is used to test the proper working of a single module.
    Integration testing is used to test the integration between the modules,
    when the complete business scenario of a client is tested (say from sales order creation to receipt of money from customer).
    Unit Testing
    When you test every single document is called unit testing.
    String Testing
    One transaction full activity is called string testing. For example Vendor
    invoice, goods received and vendor payment.
    Integration Testing
    It is purely with other modules and we have to check whether the FI testing
    is working with other related modules or not.
    Testing of combined parts of an application to determine if they function
    together correctly.There are three types of integration testing.1. Big bang
    testing: Testing with all modules combined together invariable of its
    levels. Often done for small projects.2. Bottom up test:Testing by
    integrating lower level modules and ascending towards the higher-level
    modules.3. Top down: Testing the higher-level modules and descending towards
    the lower level modules.This can be accomplished with dummy modules to
    replace the under construction modules with so-called stubs and drivers.
    not.
    Regression Testing
    Testing for whole database. Bring all the data into another server and do
    the testing is called regression.
    Thanks,
    <REMOVED BY MODERATOR>
    kushagra
    Edited by: Alvaro Tejada Galindo on Jan 31, 2008 9:45 AM

  • Duplicate control label preventing creation of unit test using UTF

    Hello Everyone,
                       I was trying to create a unit test for a VI using the unit test framework (evaluation version) to try out this tool.  I have two questions regarding that.
    1. Several sub-VIs are called by this VI. I wanted to create a unit test for each of these sub-VIs so that I could test each of them separately. But UTF provided me with the option to create a unit test for the main VI alone. The main VI is huge and getting 100% code coverage is going to be a challenging task. Is there a way by which I can create unit tests for the individual sub-VIs?
    2. When I tried to create the unit test for the main VI, I got an error saying: Cannot create a test from this VI. Contains the following duplicate control labels. This is because the same indicators are being used in different cases within a case structure.
    Is there anyway to resolve this issue?
    Thanks

    If I understand what the problem is you have to controls or indicators that have the same name. To fix this you need to give them unique names. If they need to say the same thing on the user interface then you can use the caption and change the name on that so they both have the same name.
    Tim
    Johnson Controls
    Holland Michigan

  • Unit testing PL/SQL used in APEX application

    question from my customer :
    I am developing an application in Oracle Application Express and am working on unit tests for the PL/SQL stored procedures and packages that are stored in the underlying database and that are used by the APEX application. These unit tests should run within the SQL Developer Unit Test framework.
    The problem is that some of the PL/SQL code stored in the database uses functions like NV('APPLICATION_ITEM') to access items in the apex application. These do not return any values when I try to execute the PL/SQL within the unit test framework, ie through the backend. While it is good that the NV function does not error, NULL do not really work well in my scenario either (for example when the result of this functions is inserted into a NOT NULL column of a table). I can think of a few workarounds, such as creating my own NV function inside the test schema to return desirable values, but nothing seems a really satisfactory solution. I just wonder if there is any best practice recommendation from Oracle for this scenario - how can I run code that uses APEX-specific functions through the back end. I could not find anything in the APEX documentation for this but I'd be interesting to know if there is any recommendation how to best deal with this case.
    I am using SQL Developer version 4.0.0.13.80

    User[[:digit:]*
    Your PL/SQL Package APIs are poorly designed.
    You need to take Tom Kyte's quote to heart:
    "Application come and application go, but data remains forever"
    In short, you need to separate your database processing code (the stuff you need to unit test) from front-end/middle tier code.
    (repetitiveness is for effect.. not rudeness.)
    As such, The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in APEX.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in .NET.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in JSP.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in Jive.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in Ruby.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in Perl::CGI.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in P9.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in <place latest and greatest thing here>.
    Again, I don't mean to sound rude.  I'm just trying to reinforce the idea that you need to separate database code from middle-tier/front-end stuff.
    Basically, you will need to separate all of your packages into multiple parts.
    a _CORE package (that will be unit tested) that does all the hard work
    an _APEX package for APEX infrastructure (this works with NV()/V(), etc.)
    a _NET package for .NET infrastructure when you need it
    a _JSP package for the JSP infrastructure when you need it
    a _JIVE package for the JIVE infrastructure when you need it
    a _<place latest and greatest thing here> for the <place latest and greatest thing here> when you need it.
    MK

  • Unit test code problem

    I'm doing my first proper unit test and I get an error, think min_size> is the problem
    Element type "application" must be followed by either attribute specifications, ">" or "/>".
    this generated code
    <?xml version="1.0" encoding="utf-8"?>
    <!-- This file is automatically generated by Flash Builder to compile FlexUnit classes and is not intended for modification.
    Please click on the "Refresh" icon in "FlexUnit Results" view to regenerate this file. -->
    <application xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns:s="library://ns.adobe.com/flex/spark"
                 xmlns:mx="library://ns.adobe.com/flex/mx"min_size>
        <fx:Script>
            <![CDATA[
                import flexUnitTests.serviceTestSuit;
                private var flexUnitTests_serviceTestSuit_obj:flexUnitTests.serviceTestSuit;
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
    </application>

    Hi Nikos,
    Which Flash Builder build are you using?
    FlexUnitApplication.mxml is generated from MXML Application/MXML Windowed Application(Flex/AIR project respectively) file templates configured in Window->Preference->File templates.
    Can you take a look at the template if you see any 'min_size' available as part of the template?
    However, we are unable to reproduce the issue in the latest builds.
    Thanks,
    Balaji
    http://balajisridhar.wordpress.com

Maybe you are looking for

  • How to set up and configure AirPort Express for AirPlay and iTunes

    Saw somewhere that supposedly there were some apple written guidlines on the above topic. I have searched all over for them. Anyone know where I can get a copy to read through. Just trying to educate myself a bit and sety up another room with access

  • Request for a change

    Hi all. A request for a change in the toolbar. Every time I do something the toolbar always changes to the last tool used. Maybe an option to have the toolbar always in the "normal" view, i.e., display all the tools? It gets annoying to keep having t

  • Why won't they repair my iphone

    hello every one, i baught an iphone 5 model a1428 in October in US new yoke. Now i am having trouble with my Iphone their are purple lines on my screen when i take a pic and their are dirt marks in my lens. i gave the phone to an apple store in Belgi

  • Searching Prelude Metadata in Pr

    I've been playing with Prelude on a new project, looking to add more metadata for when the time comes to edit.  I've been adding comments to clips (as suggested in the adobe video tutorials!) and those comments are apearing in the clips in Pr as expe

  • Assign Self Registration Role...

    Hi Experts, I configured Self Registration User and is working fine. My problem comes when I assign roles for only new users automatically. I created one role "X" and I want to assign it as default for all new users only. This role is assigned with "