Test coverage script?

Hi all,
Just a quick question. I wanted a program I could quickly run which would inspect all classes, and tell me which methods did not have a corresponding test methods so I would know which code lacked proper unit tests. I can write it myself....just wondering if anyone already used something similar that they cared to share :).
Thanks,
Mike

Have you looked at Emma code coverage?
http://emma.sourceforge.net/

Similar Messages

  • How to freeze or make an application hang to test a script?

    

I like to test this script
    tell application "System Events" to set theApps to name of processes whose background only is false
    repeat with oneApp in theApps
    set pState to do shell script "/bin/ps -arxo state,comm | /usr/bin/grep " & oneApp & " | /usr/bin/cut -c 1"
    if pState contains "Z" then -- if the application hangs, kill it
    tell application "System Events" to set pid to the unix id of process appname as Unicode text
    do shell script "/bin/kill " & pid
    end if
    -- delay 5 -- security delay
    try
    do shell script "open -a /Applications/Restart.app"
    end try
    end repeat
    It is supposed to run from time to time on my server checking if a programme is hanging and if so quitting it and restarting it.
    So does anybody know how one can get a programme to hang or crash? Did several experiments with Text Edit, but could not get it to crash. Interesting question though, as we are mostly concerned about crashes not happening.
    Any ideas or suggestions are welcome. 

 Thanks

    orangekay thanks
    I tried that but did not work (might be my lack of skill), or might have done it wrong though, any suggestions as to how?

  • Test coverage in LabView Unit Test Framework

    Hi,
    can somebody from NI confirm the following two statements about the Unit Test Framework:
    1. The framework does not support "recursive coverage metrics", where the coverage considers sub-VIs that are executed in the VI under test.
    2. 100% coverage means something weaker that common "branch coverage". For example, an "if" VI is a branch in the program but it is not considered as a branch by LabView's test coverage metrics.
    Thanks,
    Peter

    Hello Johannes,
    I'm interested in branch coverage of a VI under test.
    Imagine a VI A that calls another VI B. If A is tested and LV's unit test framework reports 100% test coverage for A, it is possible that the test cases didn't visit all frames (branches) in B.
    Now my question is: is it possible that LV thinks of A as "flattened" so that all code in B is considered as code of A?
    Peter

  • Castor framework improved test coverage for SAPDB/MaxDB

    Hi,
    Just to announce that Castor (Open Source data binding framework for Java) was improved test coverage for SAPDB/MaxDB, with this maybe MaxDB can gain more community users.
    enjoy
    Clóvis

    Hi,
    Just to announce that Castor (Open Source data binding framework for Java) was improved test coverage for SAPDB/MaxDB, with this maybe MaxDB can gain more community users.
    enjoy
    Clóvis

  • Test coverage of switch when using an enum

    I'm writing a unit test for the following: -
    switch (status) {
        case ACTIVE:
            return "A";
        case POSTED:
            return "P";
        default:
            throw new IllegalArgumentException("unknown status: " + status);
    }Where status variable is an enum type like: -
    public enum BatchStatus {
        ACTIVE, POSTED
    }I'm of the opinion that having the default branch above makes the code safer and more robust (it means that if the enum grows, problems can be immediately identified).
    So the question is... is it impossible to achieve 100% test coverage, but still retain the default branch above? Since the BatchStatus is an enum (and hence final, and cannot be instantiated), I can't create a third mock value that is neither ACTIVE nor POSTED, so I can't test the default branch.
    ???

    rather than use the switch block - which isn't very OO, and is a maintenance pain - why not have the enum itself return these values?
    public enum BatchStatus {
    ACTIVE("A"),
    POSTED("P");
    private BatchStatus(String status) {
        this.status = status;
    private String status;
    public String getStatus() {
        return this.status;
    }that way, the maintenance programmers have no option but to keep the lot up to date. this over-simplified example probably doesn't address your real problem, but it might point you in a direction you hadn't considered before

  • New-testcasconnectivityuser and test-outlookconnectivity script

    I am getting 2 users in AD called extest_xxxxxxxx
    How did this get created and can i delete it? 
    I did see on my exchange server under
    D:\Program Files\Microsoft\Exchange Server\V14\Scripts
    new-testcasconnectivityuser.ps1 is there. 
    Is it ok to delete extest_xxxx accounts from AD?

    Hi,
    From my point of view, the account is used to test connetivity for CAS. If you want to delete the account, then we may need to also disable those corresponding monitors or rules that use this account.
    A pre-requisite for the Exchange 2010 Management Pack is that a test mailbox account be setup for synthetic transactions using an existing Exchange 2010 powershell script that comes bundled with the Exchange 2010 installation called: 'New-TestCasConnectivityUser.Ps1'.
    More details:
    http://kevingreeneitblog.blogspot.com/2011/06/scom-and-exchange-test-cas-connectivity.html
    Regards,
    Yan Li
    Regards, Yan Li

  • Exchange test mailbox script fails to run

    Hi,
    We are using System Center Operations Manager 2012 R2 (SCOM) and Exchange 2010 in our environment. We get several messages within SCOM saying that it failed running the new-TestCasConnectivityUser.ps1 script and some other Exchange related scripts.
    I have searched for an answer but none of them seem to work. I ran the script manually using the Exchange Management Shell and tried with different OU's but I keep getting the default error telling me that either the password does not meet the requirements
    or it can not find the OU. I am 100% sure it is not the password requirement issue because I have tried several passwords and they are all very complex. I tried changing the OU naming to domain.local/Users or other OU's that we have but none of them work.
    The problem is simular to this:
    http://theucguy.net/new-testcasconnectivityuserps1-script/.
    I am not sure what the problem is and how I can resolve it. I am hoping that anyone could help me with this problem.
    Thanks in advance,
    Bram

    Hi,
    Please try to modify the New-TestCasConnectivity.Ps1 script and remove the parameter '-OrganisationalUnit:$OrganisationalUnit'
    This parameter is responsible for specifying the OU that the new account will be created into and when it is
    removed from the script, the script simply runs and installs the account into the default 'Users' OU as it should.
    Quote from:
    SCOM and the Exchange Test CAS Connectivity User Account
    http://kevingreeneitblog.blogspot.com/2011/06/scom-and-exchange-test-cas-connectivity.html
    Regards,
    Yan Li
    Regards, Yan Li

  • Weblogic workshop test browser script error

    Hi all
    whenever i run any portal sample through Workshop Test Browser ,i get following
    error.
    a dialogue window "Internet Explorer script error" with following texts
    An error has occured in the script on this page
    Do you want to continue running scripts on this page ?
    I am running Win2K professional, weblogic platform 8.1.1.0 and IE 5.0
    But this problem does not appear in WinXP & IE6.0
    ANy idea what is missing ?
    thx
    manjunath

    Hi manjunath,
    I had the same error on a similar config (win2k, ie 5). We tried several
    other configuration (with newer browsers) and didn't have the same
    experience.
    I'm almost sure that the problem is the browser, which is too old and
    doesn't support some featrue used by the webapp. If you can do it I
    suggest to upgrade to a newer version.
    BR,
    don
    manjunath wrote:
    Hi all
    whenever i run any portal sample through Workshop Test Browser ,i get following
    error.
    a dialogue window "Internet Explorer script error" with following texts
    An error has occured in the script on this page
    Do you want to continue running scripts on this page ?
    I am running Win2K professional, weblogic platform 8.1.1.0 and IE 5.0
    But this problem does not appear in WinXP & IE6.0
    ANy idea what is missing ?
    thx
    manjunath

  • Oracle Load testing- Open script at the end of recording gives this error

    I am recording a script for R12 in Open scirpt , but at the end of finish record Open script Load testing gives this error"Failed to correlate script has encountered a problem"
    Steps I followed. Open Open script-New Script. Select Load testing Protocol(Automation) - Select Oracle EBS/Forms- Create a script. Now start recording. I have EBS R12 instance and the test I am doing is just login / open a form . After that I click Stop recording. Open script pops up a Window "Exception occured while correlating script:oracle.oats.scripting.transforms.TransformException:transfrom rule threw exception in TransformStep:oats.otas.scripting.modules.formsLT.correlationformsHttpVarSubstitution.Refer to the Error Log for Details". The tool is installed on Windiws 7 64 bit and using IE8 as a browser.
    Any help?

    Hi
    Thanks JB/Glen
    My Answers
    Stupid, but have you tried to create a new script?
    ANS-Yes JB . Always try with New one only not using the same. Also before I record first I try the same steps in browser to make sure it work/oepns all.The do the same via recording)
    Is that the only script that doesn't work?
    ANS-Every script that I record has this issue on this Windows - x 64 Laptop.
    Have you tried another one? Just a simple web one?
    ANS- Open script functional recording works fine.
    Have you ran the Diagnose Tool (Help Menu)?
    ANS- Yes- All came out Green
    Have you put a specific name for the script? Special characters?
    ANS-No my script name is Test1, Test2 etc
    Restart OpenScript?
    ANS- Yes Tried several times. Also I completely uninstalled/removed registry/folders, re-installed also.
    But I have another Windows XP machine where I installed now that works fine. Only issue now on this Laptop - Why /where is the issue on this Laptop?
    Open the error view which will show in the lower pane. You may find more details.
    ANS- More details shows only "Exception occurred while correlating script." a one liner
    When you manually run the "Correlate Script" option as JB has mentioned, first un-check all but one correlation rule. This is an additional choice in "Correlate Script" menu. If no error, "Revert to recorded" again, and then "Correlate Script" again though this time un-check all but two correlation rules. Continue this effort until you narrow down the correlation rule which throws the error.
    ANS- This is a simple out of the install and I ccan see only two Rules. HTTPS Libraries and Oracle Load Form Libraries. If we leave Oracle Load form libraries checked and correlate that is where it is failing. I believe we need that Library correct?
    Thanks

  • [E-Tester]: Resulting scripts...

    Hi everyone,
    I have been using e-Tester to perform functional testing. Therefore I have created a bunch of scripts and I am running them sequentially (using my defined order) using the Job scheduler...
    1. I have been wondering, is it possible to configure e-Tester (and the Job-Scheduler) in order not to produce any Report "per script" but a single one in the end, after performing all the scripts?
    2. Also how can I configure it (e-Tester/JobScheduler) in order to prevent an MS Internet Explorer window popping-up every time a script finishes running ?
    Thanks in advance,
    Gizmo

    Hi,
    try this : go to options- > Current Script menu
    in the dialog box in the left side navigate to the Results.
    I guess there u will fine some relevent options...

  • Test Bench Scripting Language

    Hi,
    I am an intern at a company which is wanting me to create a scripting language and compiler that would be capable of controlling several instruments on their test bench through GPIB, as well as use the PXI-7833R to communicate to one of their devices over SPI.  I would consider myself an intermediate LabVIEW user that has never really worked with any type of VI which involved parsing scripts or the like.
    Is there any application other than LabVIEW that would be more suited for this type of application.  I plan to have to use several dll's written in C++ to make things easier on myself, but I wasn't sure if I was trying to re-invent the wheel here or if there was something like this that had already been done that I could refer to. 
    Any help that anyone can give on this subject would be greatly appreciated!  Thanks.

    Thank you all for responding so quickly, all of your help is very appreciated.  I will have to go through many of these languages to determine which option is going to be the best suited solution for this.  Other than TestStand and Python I really have not heard of any of the others.
    I have brought up the idea of using TestStand to the team that is going to be primarily using this application and they have said that many of them have no experience at all with LabVIEW and don't really feel comfortable with the idea of using something like that to do this.  They all say that they would feel much more at home with a text based language that they can all pick up on easily.  Which, obviously creates more work for me because I have to be able to document all of this so that it is easily to manipulate by others...
    I am looking into the LuaVIEW interface right now, I will definitely look into all of the others later and let you all know how things are progressing.  If anyone else has any other ideas for ways to make this easier I would greatly greatly appreciate it.
    I have one more question which I will really just need once I get the parsing done.  As I said in my first post I will be using an FPGA for communicating with a device that will be constantly relaying information back from an A/D.  In order to conserve space on the FPGA I am thinking of somehow parsing the code in a way that the commands that only concern the GPIB instruments will be run from the host VI and the code for communcating with the device will be loaded onto the FPGA Target VI.  Does this sound like the best way to go about this and do you have any ideas for how to do the separation?
    Thank you,
    Tyler

  • Testing discovery script in Powershell gives error on $api.CreateDiscoveryData(0, $sourceId, $managedEntityId)

    Hello,
    I'm currently starting to develop management packs for SCOM, i understand the basics and can build a simple management pack using powershell.
    During testing i'm running into a problem, when running the powershell script directly it gives an error. If i use the discovery script in a management pack everything works ok.
    The error is:
    Exception calling "CreateDiscoveryData" with "3" argument(s): "Ongeldige klassereeks (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))"
    Part of it is in dutch but it means something like invalid class.
    I tried to run the script on one of our management servers but it also gives this error.
    It's very frustrating because i want to test the discovery scripts first before building the complete management pack.
    Thanks for your help!

    Something along these lines should work for you:
    .\DiscoveryTest.ps1 -sourceID ([guid]::NewGuid().ToString("B")) -managedEntityID ([guid]::NewGuid().ToString("B"))
    Of course your parameter names and numbers may differ.
    It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.

  • Safari Vulnerability - Test for script running

    Hi everyone,
    Just wondering if anyone out there knows how to test if someone has a script running on your computer, in relation to the vulnerability from safari.
    The last few days I have not been able to load the Apple.com/au website or log into "My eBay" page. It seems as though someone is blocking it. It gets to a certain stage and will just not load anymore. Other sites load just fine.
    I upgraded to 10.4.5 and was able to load these pages for a brief period of time and then it reverted to not being able to load again.
    Is someone controlling my computer and can they get access to sensitive info??
    Cheers.
    iMac 20" G5   Mac OS X (10.4.5)  

    Thanks for the suggestion, however I am using alternate credentials when using Add-Computer. I had taken that out of the script as shown, as I've been simplifying the code down to isolate my issue. That probably wasn't clear from my initial post.
    Just to clarify, The script itself runs as Local System since it's getting launched by the local computer GPO. Even with providing alternate credentials to the Add-Computer cmdlet, the script doesn't execute the command correctly and the script never actually
    completes. I know that it is stuck at the Add-Computer cmdlet as I had put some debugging logging to a text file, and that's the last message that appears in the text file.
    In the simplifiction of my code, I was attempting to use Invoke-Command in a different user context to execute the Add-Computer cmdlet. Again, the Add-Computer was removed to simplify for debugging, but I have again run into the same issue where the script
    running as Local System now hangs at the following line of the script:
    $localSession = New-PSSession -Credential $LocalCred
    Again, I'm able to confirm that from the logging I've put in, and that's the last message that's written
    to the logfile, and I can see the process still running in Task Manager and I end up having to terminate.
    Hopefully that makes some sense and someone has come across this issue.

  • Jtag axi memory test tcl script

    Hi
    For interactive testing memory AXI bus via JTAG AXI master, I use commands:
           create_hw_axi_txn wr_txn[get_hw_axis hw_axi_1] -address   -data -len 16 -size 32 -type write   
           create_hw_axi_txn rd_txn [get_hw_axis hw_axi_1] -address  -len 16 -size 32 -type read
           run_hw_axi wr_txn rd_txn
    which output results to stdout
    I want to write tcl script for testing all Memory. I am beginner in TCL programming.
    How to redirect result of Read transaction in internal variable for comparing read and write data?
    Maybe there is script for testing memory
    Alexandr

     I dont if there is already tcl command to verify this but i will answer your question from tcl point of view
    You can assign output to internal variable like
    set b [create_hw_axi_txn rd_txn [get_hw_axis hw_axi_1] -address  -len 16 -size 32 -type read]
    Comapre b with the write data. To see the varible b rub command puts $b
    To compare you can use below command . $b is read data 00000_11111 write data here
    string compare $b 00000_11111
    If this tcl command returns 0 means read data is equal to write data
     

  • Deleting Old/Test Logic Script

    Hello All,
    When you create a Script with the BPC WebAdmin, it creates both an LGF and an LGX. When I delete an old, unused, or test script from the BPC WebAdmin, it only deletes the LGF file. When I go into UJFS, I see all the old LGX files just sitting out there.
    Is there a way to clean these up, or have the system actually delete it when you delete an LGF automatically? Or is the only way to get rid of these to manually delete them from UJFS?
    It just seems odd that when you delete the script from the WebAdmin, it doesn't delete the whole thing, just the LGF.
    Thoughts?
    Alexander
    (CPMBPC 801 SP2 (equiv to 800 SP9)

    Normally I would agree with you, however we are running into issues with with them because some of them contain old members that may not exist anymore so when a validation occurs it kicks out these old members saying they are invalid. (We are in the process of upgrading from NW 10.0 SP9 to SP12 so it's checking the scripts and the old lgx's and kicking out errors)
    I'll just mark this answered for now since I manually deleted it, was just hoping that wasn't the only way.
    Thanks!

Maybe you are looking for

  • Same problem with deployejb

    I am experiencing the same StackOverflowError as Denis (Oracle 8.1.5 on Red Hat Linux 6.1 with JDK 1.1.6 v5). I am sure that port and sid I use in the -service option of deployejb are correct. On the other hand, examining the listener log, I see that

  • Processing down payments

    Hi, I want to know the steps of doing vendor down payments. I have a PO for $10000 and i want to make a down payment for $2000 for this PO. I have not received an invoice yet for this.What steps should i be doing to pay the $2000 down payment? and wh

  • How to show Summary label it in the first column of the sheet?

    Hi Gurus, I am wondering if i could show the Label of summary items in the first column instead of showing it along with the Summary data. As with the long worksheets if the summary column is at far right it doesn't look good and not readable too. Th

  • How to install Mail

    My father has PowerBook G4 with with Mac OS 10.5.8, and he has deleted his Mail application by mistake. I have tried to install it from Leopard installation DVD, but there is only Mail 3.0, that can not work with 10.5.8. I have tried also to update i

  • ZFS ZIL and Clustering

    Hi, we are thinking about using a local RAM-Disks or local connected SSDs Disk for the ZIL, the other storage devices in the pool will be SAN disc connected via FC. If we use this in a cluster (or use export / import to move the pool to another node