Accessing Resource file in a bundle from unit test case

Hello All,
Here is my problem . I have a plugin app that is loaded in of the host application. I have a resource plist file in the plugin. I access the resource using the api [[[NSBundle mainBundle[ bundleWithIdentifier:@"MyPluginIdentifier"] pathForResource@"Resource_Name" ofType:@"Resource_Type"]. This I get path of the resource file perfectily, but it fails when I do unit testing. I am using SenTest framework kit for unit testing. When I access the resource by using above api, I get null value. Since the running executable will be otest which is located at /Developer/Tools folder, So how to access my resource file in unit test. Should I need to hard code for the Path? Any inputs are highly appreciated.
Thanks,
Naveen

So there is some important stuff realized by the UIKit UIApplicationMain function that has to be reproduced in the setup of the test.

Similar Messages

  • Accessing resource files inside Jar using Fat Jar Eclipse plugin

    Hi,
    I want to develop single JAR file that uses a set of other JAR libraries. I am using Fat Jar Eclipse plugin. It works fine. However, I have problem to access resources files (i.e. rdf file) using relative path from my classes. Is there any idea how can I pack, set classpath and use relative path in order to make it works.
    Thanks
    Zoran

    I have solved this problem. The problem was in a way how I have trying to access it. It should be like:
    URL fileURL = this.getClass().getResource("resource/myFile.rdf");
    Zoran

  • How to access a file in Unix server from windows using java

    I want to access a file in unix server from windows using java program.
    I have the following code. I am able to open the url in a web browser.
    String urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    URL url = new URL(urlStr);
    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream)));
    String inputLine;
    while((inputLine=in.readLine()))!=null){
    System.out.println(inputLine);
    in.close();
    I get the following error
    java.io.FileNotFoundException: /javatest/test.csv
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:333)
    at java.net.URL.openStream(URL.java:960)
    at com.test.samples.Test.main(Test.java:45)

    urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    I have given the format of the urlStr that I am using in the code. The actiual values are used in my code. I have tried pasting this url in the browser and it opens the file.

  • Performance test from unit tests

    Hi;
    I tried to apply the principle TDD at the level of perf test of an J2ee application and this from units tests.
    I thus used the tool JUnitPerf but regrettably with this tool I must to modify my unit test for the update of the sequence of a test and it propose nobody management of waiting time between every call of a unit test.
    Q : Know a tool more complete, stable and maintained which allows to write of the perf tests from unit test ?
    Regards;

    Hi John,
    The testing will depend on the scenario's configured in SAP, which are to be tested. As scenario vary from customer to customer, it is not possible to send a document with screen shot, as these are confidential documents. However, the write-up below should be able to give some clueon the same.
    <b>Different Type of Testing are as under</b>:
    Unit testing is done in bit and pieces. Like e.g. in SD standard order cycle; we do have 1-create order, then 2-delivery, then 3-transfer order, then 4-PGI and then 5-Invoice. So we will be testing 1,2,3,4 and 5 seperately alone one by one using test cases and test data. We will not be looking and checking/testing any integration between order and delivery; delivery and TO; TO and PGI and then invoice.
    Whrereas System testing you will be testing the full cycle with it's integration, and you will be testing using test cases which give a full cyclic test from order to invoice.
    Security testing you will be testing different roles and functionalities and will check and signoff.
    Performance testing is refered to as how much time / second will take to perform some actions, like e.g. PGI. If BPP defination says 5 seconds for PGI then it should be 5 and not 6 second. Usually it is done using software.
    Regression testing is reffered to a test which verfies that some new configuration doesnot adversly impact existing functionality. This will be done on each phase of testing.
    User Acceptance Testing: Refers to Customer testing. The UAT will be performed through the execution of predefined business scenarios, which combine various business processes. The user test model is comprised of a sub-set of system integration test cases.
    Regards,
    Rajesh Banka
    Reward suitable points.
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left. You also get a point yourself for rewarding (one per thread).

  • 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.

  • Blocking access to file sharing (AFP/SMB) from outside of network

    Hello all,
    Is there a way to block access to file shares from outside of our LAN? I have a machine that has some sharing turned on (it is also my email server) and I can reach it across the internet and mount shares as if I was in the office.
    How can I block this access? Both SMB and AFP?
    Thank you,
    -John

    Justin, thank you for your reply. The machine is on a public ip address and is not behind a NAT router. I've turned on the software firewall and that is working now. However, I imagine it would be better to use a hardware firewall. Any suggestions on a good one? Thank you.

  • How to access jpeg files on icloud drive from your iphone (5s)

    Can anyone tell me how to access a jpeg file on icloud drive from iphone? I have upgraded my macbook pro (with retina) to Yosemite, and my iphone is on ios 8.01 and I have turned on icloud drive. The only content I have seen online is accessing word docs through Pages which I get - but what about jpeg files? Thank you!

    At the moment, you can't.  A favourite complaint.  Hopefully, the situation will change in the near future, but only Apple knows when or if.

  • How to access .asl file in PSE 13 from old PSE 10?

    Can’t access .asl files I had used with PSE10 in PSE 13.  Computer: Mac OS 10.10.1  with PSE 13
    What I have done:
    1- .ASL files from PSE 10 were copied to PSE 13:  Mac HD> applications > PSE13 > Support files  > Presets > styles
    2- Closed PSE 13 and opened again
    3-  Tried to add styles with Preset Manager. Message is  “Sorry that style set has already been loaded”
    4- The only styles I can access are from the Effect/Styles panel and only the ones that came with PSE13, not my old .asl files I had been using with PSE10.

    finally found the answer here:  How to Load Layer Styles in Photoshop Elements | theStudio | Digital Scrapbooking Studio

  • How To Test Idoc To File Scenario in ID From Tools- Test Configuration

    Hi All,
    Can any body help me in step by step process including screenshots for testing Idoc to file scenario in integration directory from tools->test configuration.
    My scenario is passing the PO Idoc data from R/3  into a file  using XI.
    i have processed the idoc from R/3  and now i went to sxmb_moni in XI system and took the payload xml data.
    In ID I have navigated to test configuration from tools then i have provided the following information.
    Sender Service  : Business system of R/3 b'coz here R/3 is the sender.
    Sender Interface : ORDERS.ORDERS6
    Receiver Service : Business system of XI b'coz here XI receives the data and         places it into a file
    In payload text box i have copied the xml code which i have taken from sxmb_moni and clicked the run button. then i got the following error:
    Sender Agreement
    Internal Error
                     HTTP connection to ABAP Runtime failed.
                     Error: 403 Forbidden
                     URL: http://bxdci.boewe.custservice.de:8093/sap/xi/simulation?sap-client=100
                     User: PIDIRUSER
    Kindly look into it and correct me if iam wrong or is there any other way to test this scenario in ID please suggest.
    Thanks & Regards,
    Venkat

    Hi Venkat,
    Specify the test confisuration as follows.
    <b>Sender</b>
    Service   : Business System of SAP R/3 System
    Interface : The outbound message interface name of type the IDOC.
    Namespace : will automatically loaded when u select the Interface. Check if it the correct namespace.
    <b>Receiver:</b>
    Service  : Business System name for the Fle system.
    Paste the payload that u copied from the sxmb_moni.
    Now click on Run and test ur Scenario.
    Was the scenario sucessfull in the Message Monitor.
    Regards
    Santhosh

  • Accessing a file in Imported Archive from Adapter module

    Hi,
    I am designing a module for File/FTP and Mail adapters. Is it possible to retrieve data from a CSV or TXT file uploaded in the Imported Archive from the Java code in the module? If this is possible, do I use the same approach as accessing the CSV data from the mapping using a UDF? If this is not possible, can you suggest other ways were I can access a CSV or TXT configuration file from an adapter module?
    I would like to avoid using Module key, Parameter name and Parameter value as I would like to make the adapter module generic and the data I will be reading might be too much to be specified in this location. However, I would use the Module key, Parameter name and Parameter value to specify the CSV or TXT filename which the adapter module will be using.
    Thanks in advance for any help that you can provide.
    Regards,
    Elbert

    Imported archives are part of mapping flow and adapter modules are more part of routing. Therefore I don't think imported archive could  be made accessible anywhere outside mapping.
    but my CSV or TXT file would be updated regularly by the developer.
    So were you planning to import this file again and again under imported archive? This doesn't seems to be a good solution when you think about changin Design part in Production environment. It would be better to give access to certain folder to developer to put the file there and access it using some code. You may refer this
    /people/sundararamaprasad.subbaraman/blog/2005/12/09/making-csv-file-lookup-possible-in-sap-xi
    Regards,
    Prateek

  • How do I get access to files that I transfered from migration assistant

    Help?  I had to do an erase and reloaded the software on my 2008 imac, and did a file transfer from my time capsule using the migration assistant.  I see where the files are, but have no access...can anyone help me ?  how do I now get access to the files that I transfered?

    maedi wrote:
    I realize it is not good to get time-machine created files back by going through finder, but that seems like that is my only option.
    Were you trying to access it via either Setup Assistant or Migration Assistant?  If those don't work, you still may be able to use the "Star Wars" display to see and restore some data.  It all depends on just what and where the damage is.
    If you can get into the display, you may be able to restore the iPhoto Library; start with the most recent backup, and work back in time. 
    the  problem now is the folder is locked with a big red no go sign, and command-i cannot change it (not even when i do it on the computer on which the file was created).
    Correct; Time Machine protects it's backups with very restrictive ACLs, basically "nobody can do anything," so us mere mortals won't damage them. 
    If you use the same user account on the same Mac that did the backup, via the Finder, you should have read rights, and you may be able to copy from the backups.   
    if i succeed, am i going to see my iphoto library file in that folder?
    Yes.  Each of those date-stamped backup folders should contain a set of "hard links" to the backup copies of everything that was on your system at the time of that backup, no matter when each item was actually backed-up.  If you can copy the most recent one successfully, that will get everything.
    The iPhoto Library looks like a file; but it's actually a special kind of folder called a "package."  If you can't copy it, right-click it and select Show Package Contents to see inside it, but don't copy individual items except as a last resort -- at best, you'll recover raw photos, with no organization or data, and probably no editing, either.

  • How do I access a file on my computer from a link on my hosted Website?

    Hi Guys,
    This is my first ever post so please be patient. I am running Windows XP and Dreamweaver CS4. From a hosted Webpage I have am trying to hyperlink to a excel file on my computer.  When I click onto the hyperlink nothing happens.
    The code for the hyperlink looks like this      file:///C|/Users/mckiep/Desktop/9b.xls           Do you have any suggestions on what it is I am doing wrong?

    I don't think you want to expose your local computer to the internet like that - it's a huge security risk.
    However, you could set up a script on the website to make an FTP connection to your local box and grab the file as needed.  Of course, this will require some scripting skill, and will impose restrictions on you as the user of that file - suppose someone tries to get it at the same time as you are making changes?
    Personally, I think it's a very bad idea.
    I think the better way to do it would be to shift your work to a data-driven application on the web.  Then, at least, the security issues would be solved. But you would still need the scripting skills to code the page within which your work is being done....

  • Accessing Backup Files On Time Machine From Another Mac

    Hi everyone,
    I use 1 Time Machine on both my iMac and MacBook Air.
    How can I access the Backup Files of my iMac on my MacBook Air, using the Time Machine?
    I hope this is not too confusing! Thanks, everyone!

    Unfortunately, what you ask is complex and difficult at best for most users.  Please take a look at this User Tip provided by forum expert Tesserax for a review of the methods that might be used to do what you ask.
    AirPort Disk - Remote Access (3 Methods)
    Among the methods listed, I use Method 3, so can provide a few tips on that. It does require that your Internet Service Provider (ISP)  furnish you with a a fixed or static IP address for your Internet connection....and....that you have the correct type of modem and router that would allow Port Mapping to be able to reach the data on the Time Capsule.
    Most users choose the Back to My Mac Method, abbreviated as BTMM, which is supported by Apple. Depending on the nature of the network at work, you may or may not be able to access your backups at home.  Please contact Apple Support for more details on this.
    http://www.apple.com/support/contact/

  • How can i  create and access resource file(with .res ext) in j2me

    hi,
    i am developing an mobile international application using jsr-238 an optional api to implement the idea of internationalizationand localization.
    please tell me how can i create .res files in my application to store strings of different languages.thanks inadvance.

    Hello GG RA,
    which fileformat do you want to use (binary or ASCII)?
    There are some LabVIEW shipping examples for File I/O
    You could use the LabVIEW NI Example Finder (Help --> Find Examples..(search item "file")) to get an overview about the different file-formats in LabVIEW.
    Hope this helped out and feel free to reply if you have more questions about File I/O in LabVIEW
    Best regards
    Benjamin

  • Trouble access image files (.tif) in browser from web page

    Interesting issue. I have a database storing file locations
    for some images in the .tif format. I then created my web page and
    have a link that uses the value in the database. when i click on
    it, i get the red x. however, if I copy and paste the link into my
    browser, the images pops up as it should. Am I missing something
    here?

    James0816 wrote:
    > Interesting issue. I have a database storing file
    locations for some images in
    > the .tif format. I then created my web page and have a
    link that uses the
    > value in the database. when i click on it, i get the red
    x. however, if I
    > copy and paste the link into my browser, the images pops
    up as it should. Am I
    > missing something here?
    >
    I don't think browsers can display TIFF files unless they
    have a plug
    in.... tiff images are way too big (file size) to be using in
    a webpage
    anyway

Maybe you are looking for

  • Adobe muse - how to upload images in photo gallery in the admin console?

    Question from Adobe Muse beginner - I can't figure out how images can be uploaded in a slideshow/photo gallery in the admin console? I can edit or delete images but not upload additional images?

  • Disk Utility Freezes When Verifying HD

    Not sure what's gone wrong here--hoping you folks can help me out. I wanted to make sure my OS X directory was in okay shape, so I tried to "verify disk" using Disk Utility. After a few seconds, the application becomes completely unresponsive. Activi

  • Install a network priunter driver in Windows 7 as a printer is offline or disconnected

    Can anyone help me ? How to install a network priunter driver in Windows 7 when the network printer is offline or disconnected?

  • USER EXIT- Structure or View as well?

    Hello friends i have a quick question. I created a User exit by adding the ZZfields in the Structure.When i replicated into BW i couldnt see those 3 zz fields.When i went back to the Generic Datasource and checked in 'Display Field List' i see my fie

  • Connecting 2nd Ipod to Itunes

    I have purchased an Ipod mini for my other half and already have Itunes on my windows based PC linked up to my Ipod. Does anyone have any ideas on how I can link the new Ipod mini to my Itunes without losing the link to my Ipod? Any help gratefully r