Using Mockito for writing ATG test case

Hi,
Does anyone have idea about writing unit test case for ATG using Mockito? I came across following discussions while goggling -
https://forums.oracle.com/thread/2531576
http://stackoverflow.com/questions/9373782/using-powermock-to-obtain-the-atg-nucleus-in-testing-results-in-npe
But need a help in setting up Nucleus and other dependencies (DAS, DPS, DSS etc.) and a sample test class for a droplet using Mockito.
Thanks.

Forget it. Found ExternalizableHelper.toBinary and fromBinary.

Similar Messages

  • Getting error while writing JUnit test case for RestFul Services

    Hi All,
    I have written Restful services in Netbean 6.8.
    It's running well...no issues.
    {color:#0000ff}While writing JUnit test cases for them, I am getting following error:
    {color}{color:#993300}Testcase: testGetAuthenticated(com.ct.services.LoginServicesTest): Caused an ERROR
    Implementing class{color}
    java.lang.IncompatibleClassChangeError: Implementing class
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:160)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:65)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
    at com.ct.services.LoginServices.getAuthenticated(LoginServices.java:205)
    at com.ct.services.LoginServicesTest.testGetAuthenticated(LoginServicesTest.java:84)
    Test com.ct.services.LoginServicesTest FAILED
    F:\NetbeanProjectsWorkspace\DemoProject\nbproject\build-impl.xml:972: Some tests failed; see details above.
    BUILD FAILED (total time: 11 seconds)
    {color:#0000ff}Strange thing is that when I am commenting below lines and its related calls:
    {color}
    {color:#ff0000}EntityManagerFactory mEmf = Persistence.createEntityManagerFactory("AnyName");
    EntityManager mEm = mEmf.createEntityManager();
    {color}
    {color:#0000ff}from my code, JUnit test cases are working fine.
    {color}Anybody having any idea about this ?
    Thanks
    Avi
    Edited by: Avi007 on Aug 28, 2010 5:17 AM

    Hi All,
    [http://stackoverflow.com/questions/2778295/test-driven-development-problem]
    Please refer the above link for the solution
    Thanks
    Avi
    Edited by: Avi007 on Aug 30, 2010 12:33 AM

  • [svn:bz-trunk] 21014: bug fix for RTMP security test case failure for Tomcat 7,

    Revision: 21014
    Revision: 21014
    Author:   [email protected]
    Date:     2011-04-04 13:44:59 -0700 (Mon, 04 Apr 2011)
    Log Message:
    bug fix for RTMP security test case failure for Tomcat 7,
    defer the ValveBase.getContainer() call to run time.
    Checkin tests not run as it only applies to Tomcat 7
    Modified Paths:
        blazeds/trunk/modules/opt/src/tomcat/flex/messaging/security/Tomcat7Valve.java

    Revision: 21014
    Revision: 21014
    Author:   [email protected]
    Date:     2011-04-04 13:44:59 -0700 (Mon, 04 Apr 2011)
    Log Message:
    bug fix for RTMP security test case failure for Tomcat 7,
    defer the ValveBase.getContainer() call to run time.
    Checkin tests not run as it only applies to Tomcat 7
    Modified Paths:
        blazeds/trunk/modules/opt/src/tomcat/flex/messaging/security/Tomcat7Valve.java

  • Using Log4j for writing files

    Hello,
    Is possible to use log4j for writing files?
    For example:
    I have an application that produce several report txt files is possible at runtime produce them using log4j features?
    Thanks

    Did you ever got an answer for this??? I'm starting a new project with ORACLE 9i and the site have a NAS. It will be very helpfull to know if it's possible and how can it be done.
    Thank you,
    Ulises Feliciano Troche
    GIS Analyst
    GMT

  • Does anyone know which companies use VirtualBox for Product QA testing?

    Hi guys,
    I am doing Software QA testing and currently looking into using virtualization tool.
    Does anyone know which companies use VirtualBox for Product QA testing?
    I know there are alot of companies using VMWare, but have never heard of any using VirtualBox?
    Help me out with the list. Does Oracle ever use their own VirtualBox for testing their own range of products?

    Well, Oracle uses internally more & more VirtualBox and we see more & more companies using VB instead of VMWare.
    Very similar, maybe VB better in memory management
    JB

  • Using SQ02 for writing ABAP programs

    Hello,
    I am using SQ02 coding section for writing some simple ABAP programs, mainly for reporting purposes. I would like introduce more power into my programs, but SQ02/SQ01 reports return "ACCESS_DENIED" when I for example try to call a function (GUI_DOWNLOAD).
    Can You advise how to extend SQ02 authorization to enable function calls?
    Maybe You know other place from which You can write programs without a developer key?
    Thanks,
    Pawel

    Hi Uday,
    do You mean that I have to first make a recording on cg3y using transaction shdb, then create a function module basing on this recording, and then use this function module in my code?
    Pawel

  • Using PrintWriter for writing to file

    Friends,
    I am just begginer in Java programming. I am trying to write a message to the Log file as below. It just opens the file but writes nothing to it. What is missing here ? any help is appreciated.
    FileWriter fw = new FileWriter(new File("Readonly.log"));
    BufferedWriter bw = new BufferedWriter(fw);
    PrintWriter pw = new PrintWriter(bw);
    pw.flush();
    String message="Check This Out";
    pw.println(message) ;
    Thanks,

    Friends,
    I am trying to write to a log file in the append
    mode. It seems FileWriter would open the file as a
    new file each time and overwrite the eralier contents
    of it. I am not sure what would be the correct way
    to do this.
    Can any one help ? I appreciate your time and help
    in advance.
    Thanks,Then I doubt you're using the proper FileWriter constructor. I'm sure if you pass 'true' for the append parameter, it will not overwrite the contents.

  • Test topic for duke dollars test case

    Have had issues reported regarding not being able to assign duke dollars. This is a test to see if there's an issue or not. -- DanG

    it should look like:
    Forum Home > New To Java Technology
    Topic: test to assign Duke dollars
           Duke Dollars
           If you'd like, assign Duke Dollars to this topic to encourange
           others to answer your question. [More Info]  at the top of this thread.

  • Setting bind variables for VO in JUnit test case

    Hi,
    I am using Jdeveloper 11.1.2.2
    I have a problem while writing the test case for VO in JUnit.
    For the Remove method in the Test case , I have passed variables into the VO by using a setWhereClause() .
    Like this :
            view.setWhereClause(null);
            String whereClause = "location_id = '" + newUpdatedLocationId  + "' AND organization_id = '" +newOrganizationId + "'" ;
            view.setWhereClause(whereClause);
            view.executeQuery();
            while (view.hasNext()) {
                view.next();
                view.removeCurrentRow();
            fixture1.getApplicationModule().getTransaction().commit();But it is showing a an error like the bind variables are not set.
    So how will I access Bind variables programmatically and set the values ?
    Thanks
    Nigel.

    setNamedWhereClauseParam() is used for setting bind variables

  • OTM  filter/query for the test cases with Test Steps seciton = Empty?

    Hi Folks,
    How to query/ fliter for all those test cases which does not have any test steps. They Test Step Section is empty. How to acheive this in OTM?

    this happens particularly when multiple people work on the same test case to update it from multiple machines.
    Edited by: OATS Explorer on Feb 22, 2012 4:10 AM

  • How to dispatch the result from test cases to the function that loads

    Hi ,
         I am currently working on writing a test case and i ant to execute the test case and the result of the test cases needs to be returned to function that loads the swf file using loader.
    Below is the structure
    1) Project A
             Has a action script file that has a loader which inturn loads the swf file.
    public function testRunner():void {
                loader = new Loader();
                loaderDispatcher = loader.contentLoaderInfo;         
                sharedEvents = loaderDispatcher.sharedEvents;
                parentURL = loaderDispatcher.loaderURL;
                parentDomain = URLUtil.getServerNameWithPort(parentURL);
                parentScheme = URLUtil.getProtocol(parentURL);
                load("http://localhost:8000/abc.swf");
        var callback:Function = addAsync(onMessage, 30000, {}, handleTimeout);
        sharedEvents.addEventListener("message", callback);
        /*Listener added to receive message event*/
        sharedEvents.addEventListener(MessageEvent.MESSAGE, onMessageEvent);
            private function load(location:String):void {
                // create SWF loader
                loaderDispatcher.addEventListener(Event.OPEN, onOpenEvent);
                loaderDispatcher.addEventListener(Event.INIT, onINIT);
                loaderDispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, onStatus);
                loaderDispatcher.addEventListener(Event.COMPLETE, onComplete);
                loaderDispatcher.addEventListener(IOErrorEvent.IO_ERROR, onError);
                loaderDispatcher.addEventListener(Event.UNLOAD, onUnload);
                loaderDispatcher.addEventListener(Event.CLOSE, onClose);
                var request:URLRequest = new URLRequest(location);
        //request.idleTimeout = 8000;
        try{
    loader.load(request);
    _subMovie.addChild(loader);
           catch (error:Error)
                     trace("Unable to load URL: " + error);
                // listen for DISPATCH events
                sharedEvents = loader.contentLoaderInfo.sharedEvents;
        sharedEvents.addEventListener(DISPATCH_EVENT_TYPE, handleDispatch);
    2) Project B
          Project B has the test cases written and teh swf file for this project is abc.swf.
    test.mxml
    public function go():void {
    var core:FlexUnitCore = new FlexUnitCore();
    core.addListener(new TestCaseListener());
    core.run(ABCTest);
    var messageEvent:MessageEvent = new MessageEvent("message","action test","action testing");
    //loaderInfo.sharedEvents.dispatchEvent(messageEvent);
    When I load abc.swf file this inturn call the mxml file which runs the testcases by using the FlexUnitCore .
    What I am looking for is dispatching the result that is available in TestcaseListener to the call of loader ie; in Project A
    public class TestCaseListener extends RunListener  {
    public override function testRunFinished(result:Result):void {
    trace("testRunFinished invoked 1 ::");
    trace("failureCount::"+result.failureCount);
    trace("failures::"+result.failures);
    trace("successful::"+result.successful);
    Is there any way in which i can dispatch the result from testcaselistener to the call where this swf file is loaded .

    Hello Sue,
    I just tried to export to excel with the esdev extension and got java.lang.NumberFormatException. I found the workaround at Re: Windows Multi-language env, - how do I set English for application lang?
    open the file sqldeveloper\jdev\bin\sqldeveloper.conf and add the following two lines:
    AddVMOption -Duser.language=en
    AddVMOption -Duser.country=USyet now my date formats in excel are 'american-style' instead of german. For example 01-DEC-01 so excel does not recognize it as date and therefore I can not simply change the format.
    When export to excel will be native to 1.1 perhaps someone can have a look at this 'feature'
    Regards
    Marcus

  • AirPlay certification: Unable to execute test cases 3.2.1.3 and 3.2.1.5

    Hi everyone,
    I'm following the test cases specified in the AirPlay Product Compliance Test R6 Document for AirPlay. I'm unable to execute the below test cases when I'm testing for airPlay certification. There is no option in the latest Airport Utility on Macbook for executing these test cases,
    Is it mandatory to execute and pass these test cases? How do I do it?
    3.2.1.3 Link Layer Connection 10 Mbps/Full Duplex
    3.2.1.5 Link Layer Connection 100 Mbps/Full Duplex
    Thanks in advance for your help.
    Sripad

    Diane,
    Thank you very much for the response.
    I will email you the screen shots since I can not attach them to this post.
    You will see in the screen shots that I don't see either a green or red light after I have clicked on the record topic icon from UPK Developer. Even after I put focus on the title bar of the app I am recording and press the printscreen button, there is no green or red light.
    But now, when I do press the printscreen button, UPK does actual record something. That is further than I have gotten before.
    Before I posted the forum, I was not able to record anything after several attempts and also several re-installations. But I was told that if I don't see the green or red light, I won't be able to record anything.
    I am now wondering if the use of Hypersnap 6 could be impacting UPK? I use Hypersnap a lot and when I pressed the printscreen button, Hypersnap also takes a screenshot.
    My question now is whether the lack of green and red lights will impact my use of UPK?
    Thanks
    Chris
    Edited by: user455985 on Dec 22, 2010 2:04 PM

  • How to edit test case document?

    Hello All,<br>
    <br>
    In SOLAR02 transaction, we are uploading the test case documents in the test cases tab.<br>
    <br>
    Later we can create test plans & test packages. These test packages once assigned to the tester, it comes in the worklist of the tester.<br>
    <br>
    The tester while testing the test cases, can record the test results from the test workbench using the traffic light symbolled icon.<br>
    <br>
    But, my requirement is <b>to edit the test case document and to give some explanation about what all went right and what all went wrong</b>.<br>
    Is that possible?<br>
    <br>
    Any inputs in this regard will be greatly appreciated.<br>
    <br>
    Thanks & Best regds,<br>
    Alagammai<br>

    Hi all,
    I was looking for the similar info on the net, and I run into this, saying:
    Here is some info from sdn.com
    This depends on your support package level. But at least in one of the latest support packages this was made possible. You need to make a little customizing in transaction STWB_SET. Under "Notes" you must mark "Use test document". This means that in STWB_WORK when you add a note for a specific test case then a copy is made of your test script in which you can then enter results. This is then done without editing the test script template document.
    If this customizing is not available then you have to apply the latest solman 7.0 support packages.
    Thanks, just what was needed!!
    Now test plan documents can be opened in STWB_WORK and edited there. Remark is that in creating the test plan (STWB_2), Test note drop down list should have the same value as the test document in Test cases tab (SOLAR02).
    Would it be possible also to open test documents (Word, Excel, etc) in STWB_WORK in full screen somehow? That was not yet managed to be done.
    Me personally haven't tried it yet, as I have to finish some other jobs first, but I thought it would be nice to share the info
    Regards,
    N

  • How to make sure all my automatic test case run in one session?

    Hi guys,
        I'm doing some automatic test for our products.
         Now i'm hindered by an issue(maybe,due to my wrong configuration).
         I've wrote some test method in a Coded UI Test project,and these run perfect on local machine.And i build an environment includes Builder Controller,Builder Agent,TestController and Test Agent etc, and that the test cases have been written
    in MTM already. 
          After that,i built the project,deployed the project and run the Coded UI Test on Test Agent machine,and i found it seems that he test cases run on different sessions.I have no idea how to config or set up to make sure all my test cases
    run just in one session.
        Could anyone help me,please?

    Hi dean.chen,
    >>I found it seems that he test cases run on different sessions.I have no idea how to config or set up to make sure all my test cases run just in one session.
    According to your description, could you please tell me what the different sessions are when you run the test cases in MTM?
    Why did you want to run the test cases in one sessions?
    where did you see the test cases run on different sessions?
    Could you please tell me how many test agents machine you use to run these automatic test cases in MTM?
    As far as I know that if you just use one test agent machine to run these automatic test cases in MTM, these test cases will be run one by one on the one test agent machine.
    To help you solve this issue, please tell me more detail message about this issue.
    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.

  • Need info on BSP tags  Test Suite and Test Case

    Dear All,
                 Could any one pls send me some info on the BSP tags Test Suite and Test Case.
    Thanks,
    Sirisha.

    Hi,
             I have gone through the sample examples.. for TestSuite and test case.. but im unable to understand it. I need some documentation on the usage of these tags..
    Thanks,
    Sirisha.

Maybe you are looking for

  • My iPod touch is not playing through my stero

    My iPod touch 4g is not playing through my stero. My stero has a dock that you can plug in your iPod or iPhone and you are able to select music to listen to. My iPod used to be able to do it but now it won't. My iPod shows that it is conected, but ev

  • Reading File in native format and attaching it.

    Hi all, I am reading file in native format(Without schema) and wish to attach it before sending it accross. I am assigning .csv instead of .html . I am getting the following error <mismatchedAssignmentFailure xmlns="http://schemas.xmlsoap.org/ws/2003

  • How do i get past apple id login after updating to iOS 8 on iPad 2

    I recently updated my iPad 2 to iOS 8 and now it is asking for my iCloud password to log in. I have read some of the other posts on this matter. However non of them seem to work. I have logged into i message and face time with new current account. I

  • Cannot transfer cust fields to PO using badi BBP_CREATE_PO_NEW in classic

    Experts, We want to transfer the values from our Z-fields in the shopping cart header directly to the header Z-fields of the PO. We have implemented the BBP_CREATE_PO_NEW badi in classic scenario, but no values are transferred. following coding we di

  • EnqStoreTopHist: Lock Table Overflow

    Hello SAP agents, This is the error log from our basis team. As I checked with SD users, they didn't do anything special in VT01N/VT02N and there are no big volumn in their shipment. Maximun there will be 70 items inside. This will not cause any tabl