Unit Test Suites

Is there a way of not deploying test suites via ant command while moving to test and higher environments. Currently, I have created tests under test suites and works perfectly in dev env but when I try to deploy it in test env the unit tests also gets deployed since it is baked in the jar.
I am using oracle soa suite 10.1.3.5,
Edited by: 896571 on Nov 10, 2011 2:30 PM

I don't believe there is any built in option for doing this. We use the ant tasks for all of our deployments and if you do this you would add a task into your ant script to delete the test suites out of the packaged JAR/SAR file before deployment.
Thanks,
Adam DesJardin

Similar Messages

  • How to make a Abap Unit Test Suit with many test classes

    Hi,
    Problem space
    we have different packages(embedded) in our project and each package corresponds to a differnt functional layer in the design.
    We want to create abab unit test classes for these different layers.
    say embedded package 1 has 10 unit test classses
          embedded package 1 has 20 unit test classses
    How to grup these classes together so that we can start them frm a test suite.
    Code examples and blogs links will be appreciated.
    regards
    anubhav

    This sounds a bit like Project Administration 101 to me.
    I'm not exactly sure what you are actually trying to do here --but generally if you want to functionally test something you need to start with a business process -
    You need to create scripts which tell the user the data to be entered, the transaction to be used and the outcome.
    With SAP you might need to show screen shots of each stage as well.
    You follow this for each complete business process until you've covered the whole business cycle.
    You complete this say individually for Logistics, Purchasing and Finance and then compare what SAP gives you with what you expected to get.
    For some type of testing CATTS can help but without the business processes any testing is essentially meaningless.
    It is totally pointless trying to design a "generic" test plan until you've got the functional consultants to describe the business processes involved.
    Cheers
    jimbo

  • Unit Test exports between different SQL Developer versions

    Hi,
    I am having problems with trying to export and import unit test suites between SQL Developer versions. I can't find any documentation in this area. We have a number of unit test suites exported as XML files from version 2.1.1.64, and below are combinations of things I have tried:
    - I have tried to import a unit test suite into version 3.0.0.4 that was exported from version 2.1.1.64 and get the error "Import failed. unexpected null value". I expect that this is probably an unsupported action due to repository changes between the two versions - should I be able to do this?
    - I have upgraded the repository with unit tests in it. The unit tests run perfectly well in the upgraded repository. However, if I try to export any suites or individual tests, I get an error "Export failed.". A XML file is created but with what looks like only the header part of it.
    - I have created a new unit test suite in version 3.0.0.4 and this exports successfully.
    - I have gone into each test of a suite in the upgraded repository and made a change so that I can perform a commit. When I do an export, this does then work successfully.
    Therefore it appears that something is not carried out by default when the repository is upgraded, but this fixes itself if the test is amended and committed in the upgraded repository. Although this may be a workaround, we have 100's of tests and is not something I really want to do. Has anyone else experienced this and got any recommendations for this?
    Thanks, Pierre.

    Hi,
    I am having problems with trying to export and import unit test suites between SQL Developer versions. I can't find any documentation in this area. We have a number of unit test suites exported as XML files from version 2.1.1.64, and below are combinations of things I have tried:
    - I have tried to import a unit test suite into version 3.0.0.4 that was exported from version 2.1.1.64 and get the error "Import failed. unexpected null value". I expect that this is probably an unsupported action due to repository changes between the two versions - should I be able to do this?
    - I have upgraded the repository with unit tests in it. The unit tests run perfectly well in the upgraded repository. However, if I try to export any suites or individual tests, I get an error "Export failed.". A XML file is created but with what looks like only the header part of it.
    - I have created a new unit test suite in version 3.0.0.4 and this exports successfully.
    - I have gone into each test of a suite in the upgraded repository and made a change so that I can perform a commit. When I do an export, this does then work successfully.
    Therefore it appears that something is not carried out by default when the repository is upgraded, but this fixes itself if the test is amended and committed in the upgraded repository. Although this may be a workaround, we have 100's of tests and is not something I really want to do. Has anyone else experienced this and got any recommendations for this?
    Thanks, Pierre.

  • How  to genearte Unit Test reports  through  ANT/Command  line ?

    Hi,
    I am using sql developer unit test feature to test my database code. I am planning to execute and generate reports by running ant script.
    Is it possible to get the unit test results in any format (text,XML,HTML) after running the tests.
    How to integrate report generation tasks as part of Automated builds?
    Is there any command line utility do through can invoke through ant task?
    Thanks,
    Fernando

    Fernando,
    I, too, am looking to run our PL/SQL unit test suites through our automated ant build scripts. Currently, I've only been able to determine that there is a "UtUtil.bat" and "UtUtil.sh" command line utility for win and linux in /sqldeveloper/sqldeveloper/bin. However, it only take three switches:
    UtUtil -run ?
    UtUtil -imp ?
    and
    UtUtil -exp ?
    While this does provide some limited value to us through automating the importing of our exported test suites and then running them as part of our builds, it doesn't help in running reports on the test runs and exporting the reports to something our build processes can consume (i.e. xml).
    Also, we want to be able to run our full db build on (almost) any of our development machines and we don't want to have to have a unit test repository already preconfigured on each development db. I haven't found a utility to automate the creation of the unit test repository user and the repository, and then whena all the test suite runs have finished and the reports run, delete the repository and repository user.
    We have used Quest's Code Tester product in the past and it had all of these great features that I am really hoping Oracle can either implement or expose to us.
    Regards and best of luck,
    Mike Sanchez

  • Unit Tester: Bug in Export/Import of Suites

    I was moving my Unit Test repository from one schema to another, so I first exported all of my suites and then imported them into a new repository.
    But, when I imported them into their new repository, all of the tests forgot what specific function/procedure name within a package they were actually calling. For example, the test that used to be for "pccdb.rotat_maintenance.parseRotatKey", now says it's going to call "pccdb.rotat" (i.e. the specific function name it's supposed to be calling within that package disappeared).
    I went looking and found that in the UT_TEST table, the "object_call" column was null for all of my tests, but because all of my tests call methods within packages, I'm thinking that column shouldn't be NULL. So, I filled in the appropriate function name for one of them, and the test started working....
    So, something in the import or export of unit suites (or their tests) isn't working quite right in populating the ut_tests.object_call column, I'm guessing - please take a look at it.

    This was originally reported in SQL Developer 2.1: Problem exporting and importing unit tests thread. It was logged as
    Bug 9236694 - 2.1: OTN: UT_TEST.OBJECT_CALL COLUMN NOT EXPORTED/IMPORTED
    It has been fixed and will be available in the next patch release.
    Brian Jeffries
    SQL Developer Team

  • How to measure memory consumption during unit tests?

    Hello,
    I'm looking for simple tools to automate measurement of overall memory consumption during some memory-sensitive unit tests.
    I would like to apply this when running a batch of some test suite targetting tests that exercise memory-sensitive operations.
    The intent is, to verify that a modification of code in this area does not introduce regression (raise) of memory consumption.
    I would include it in the nightly build, and monitor evolution of summary figure (a-ah, the "userAccount" test suite consumed 615Mb last night, compared to 500Mb the night before... What did we check-in yesterday?)
    Running on Win32, the system-level info of memory consumed is known not to be accurate.
    Using perfmon is more accurate but it seems an overkill - plus it's difficult to automate, you have to attach it to an existing process...
    I've looked in the hprof included in Sun's JDK, but it seems to be targetted at investigating problems rather than discovering them. In particular there isn't a "summary line" of the total memory consumed...
    What tools do you use/suggest?

    However this requires manual code in my unit test
    classes themselves, e.g. in my setUp/tearDown
    methods.
    I was expecting something more orthogonal to the
    tests, that I could activate or not depending on the
    purpose of the test.Some IDEs display mmeory usage and execution time for each test/group of tests.
    If I don't have another option, OK I'll wire my own
    pre/post memory counting, maybe using AOP, and will
    activate memory measurement only when needed.If you need to check the memory used, I would do this.
    You can do the same thing with AOP. Unless you are using an AOP library, I doubt it is worth additional effort.
    Have you actually used your suggestion to automate
    memory consumption measurement as part of daily builds?Yes, but I have less than a dozen tests which fail if the memory consumption is significantly different.
    I have more test which fail if the execution time is siginificantly different.
    Rather than use the setUp()/tearDown() approach, I use the testMethod() as a wrapper for the real test and add the check inside it. This is useful as different test will use different amounts of memory.
    Plus, I did not understand your suggestion, can you elaborate?
    - I first assumed you meant freeMemory(), which, as
    you suggest, is not accurate, since it returns "an
    approximation of [available memory]"freeMemory gives the free memory from the total. The total can change so you need to take the total - free as the memory used.
    - I re-read it and now assume you do mean
    totalMemory(), which unfortunately will grow only
    when more memory than the initial heap setting is
    needed.more memory is needed when more memory is used. Unless your test uses a significant amount of memory there is no way to measure it reliably. i.e. if a GC is perform during a test, you can have the test appear to use less memory than it consumes.
    - Eventually, I may need to inlcude calls to
    System.gc() but I seem to remember it is best-effort
    only (endless discussion) and may not help accuracy.if you do a System.gc(); followed by a Thread.yield() at the start it can improve things marginally.

  • SQL Developer 2.1: Problem exporting and importing unit tests

    Hi,
    I have created several unit tests on functions that are within packages. I wanted to export these from one unit test repository into another repository on a different database. The export and import work fine, but when running the tests on the imported version, there are lots of ORA-06550 errors. When debugging this, the function name is missing in the call, i.e. it is attempting <SCHEMA>.<PACKAGE> (parameters) instead of <SCHEMA>.<PACKAGE>.<FUNCTION> (parameters).
    Looking in the unit test repository itself, it appears that the OBJECT_CALL column in the UT_TEST table is null - if I populate this with the name of the function, then everything works fine. Therefore, this seems to be a bug with export and import, and it is not including this in the XML. The same problem happens whether I export a single unit test or a suite of tests. Can you please confirm whether this is a bug or whether I am doing something wrong?
    Thanks,
    Pierre.

    Hi Pierre,
    Thanks for pointing this out. Unfortunately, it is a bug on our side and you have found the (ugly) "work-around".
    Bug 9236694 - 2.1: OTN: UT_TEST.OBJECT_CALL COLUMN NOT EXPORTED/IMPORTED
    Brian Jeffries
    SQL Developer Team

  • Flash Builder 4.7 Unit Tests for Mobile Devices

    I am trying to setup a simple unit test using Flash Builder 4.7. I created a Test Suite and a Test Case class.
    Using the menu, I select Run > Run. I see options to select which Test Case / Methods I'd like to run.
    But the strange thing is, next I have to select a launch configuration. I'd assume it would just launch in some console window and give me test results. I did what I could and have it setup to run on the AIR simulator for a XOOM device. Nothing happens I just see a blank screen with a blank bar at the top.
    I've also tried right clicking the project and choosing execute flexunit tests. My FlexUnit Resulst still says 0/0.
    What is the launch configuration I need to use to execute the test cases and get the results?

    I solved it! After looking at example code on google, I realized that the s:ViewNavigatorApplication was missing two key options:
    firstView="flexunit.flexui.FlexUnitTestRunnerUIMobile"
    firstViewData="{getFirstViewData()}"
    Thankfully I was able to derive this. It makes 0 since to me why this wouldn't be added to the automatically generated mxml file but the functions it utalizes does. This to me seems like a defect. If you'd like people to use automatically generated files, make sure they are functional.
    Thanks

  • Unit test with JUnit

    Hi all,
    I use Eclipse IDE: Eclipse Java EE IDE for Web Developers. Version: Indigo Release
    I use JUnit 4. For project properties> Java Build Path> Libraries: I have JUnit4 added. Also under the same tab: Maven Dependencies> I have junit-4.8.2.jar
    In pom.xml I have:
    <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.8.2</version>
          <scope>test</scope>
        </dependency>Basically, I’m writing unit tests using JUnit in the past few months! All I needed to do was to create a test class, add a test method like below:
    @Test
    public void testMethod(){
              // Some test code
    }Right click on method, Run As> JUnit Test
    That’s all I needed to do to either run my unit test or do Debug As> Junit Test to debug my unit test.
    All was fine with the world! Starting yesterday, when I add a new test method in a test class, and then do: Right click on method, Run As> JUnit Test
    Nothing happens! I cannot run or debug any test anymore! Meaning I cannot add any new unit test!
    Let me also add that after I add my test method, I do a clean build thru Eclipse and Eclipse sees the newly complied class which contains my new test method.
    Since none of my configurations changed, I have no idea what went wrong!
    Does anybody has any idea? Any help would be greatly appreciated.

    aksarben wrote:
    Yes, I have an idea: Post your code. I for one am not going to my waste my time speculating and guessing.Could also just be IDE crud. I've had similar problems with older versions of Eclipse. Never with current ones though.
    OP: eclipse creates run/debug configurations for each class. If you search around a little you should find the dialog, I don't know the exact name. I think you can reach it from the "run as" menu options. You should try clearing the settings of your test suite to see if that changes anything.

  • Run unit test in comand line

    Hello everybody,
    I try to run existing unit test in comand line:
    ututil -run -test -name ROW_COUNT -repo unit_test_repos -db finch
    where
    ROW_COUNT - simple unit test
    unit_test_repos - unit test repository, which i create using tutorial (http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev/r30/sqldev_unit_test/sqldev_unit_test_otn.htm)
    finch - owner of procedure, which i try to test
    after execution this command i receive this message:
    C:\sqldeveloper\sqldeveloper\bin>ututil -run -test -name ROW_COUNT -repo unit_test_repos -db finch
    SEVERE Error: No Repository was found on the selected connection, you need to create a repository. - oracle.dbtools.unit_test.UtRepositoryManager.openConnectionWithChecks(UtRepositoryManager.java:214)
    Unable to open repositoryafter that i try to execute command with another parametres (instead of finch i use sys-user), but receive equal result.
    what`s wrong?
    in Help document i find next:
    The following example runs a unit test named AWARD_BONUS in a Windows environment where SQL Developer is installed under Program Files. (Note that test and suite names are case sensitive for the command-line interface.) This example uses the repository connection for user unit_test_repos and runs the test as user fred.
    cd c:\Program Files\sqldeveloper\sqldeveloper\bin
    ututil -run -test -name AWARD_BONUS -repo unit_test_repos -db fred"
    fred is connection which exist in oracle sql developer interface? what kind of privilegies should fred has?
    In oracle sql deevloper exist several connection to another servers. i`t can be reason of error?
    I trying in oracle sql developer interface select finch as manager of unit tests (tools - unit_test - manage_users to the next i select in dropdown list "finch" and granted needed privilegies for him) , but result was`t changed.
    thanks.

    It looks like you need to spark up SQL Developer, create a repository connection and assign that in the Unit Test Menu. It will walk you through creating the repository and then you can refer to that from the command line.

  • VS2008 unit tests

    Hi,
    I have Unit tests in VS2008 and the test configuration is set to generate Source Code Coverage, where I have selected all the referred assemblies. But when my tests finish executing, I just the code coverage for my unittest.dll and not the assemblies that
    are tested.
    Is there something that I am missing? I have verified that the tests do refer to code in the referred assemblies.
    I am using VS2008 Team Suite on 64 bit Windows 7 Enterprise
    Regards,
    Anubhav.

    Hi Anubhav,
    To make sure that whether you really refer to the assembly you want to test, I suggest you add a breakpoint in the class method you want to test, and then just debug your test method in your test project, if the breakpoint is not hit in class method, I think
    it would be your test method issue, for example, it doesn't class this class method or others.
    >>where I have selected all the referred assemblies.
    Do you make sure that you enable the dll file you want to collect code coverage? Maybe you forget to add it or add other dll file. You'd better remove and re-add it again. Please check the dll file path.
    Please also install the VS2008 SP1. 
    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.

  • Cairgorm 3 sample applications - errors in unit tests

    After the last update the sample applications started to work - they now even show images.
    But the unit tests for Commands are reporting errors on my machine:
    TypeError: Error #1034: Type Coercion failed: cannot convert []@56443a9 to XMLList.
    at asmock.integration.flexunit::ASMockClassRunner/withBeforeClasses
    at org.flexunit.runners::ParentRunner/classBlock(ParentRunner.as:221)
    etc...
    As I am just starting to explore unit testing, I do not know how to debug it.
    Can someone help me?
    Thanks, Zdenek M

    Hi,
    Could you confirm that you are running the unitTests using the InSyncBasicTestRunner.mxml? Also make sure that you don't have another version of FlexUnit4 on your classpath (Project->Properties->Flex Build Path) as the one shipped with the latest version of Flash Builder may conflict with the version of ASMock we are using at this time.
    Let me know if you are still experiencing issues with the test suite.
    Best,
    Nicolas

  • SQL Developer 3.0 Unit Test

    Hi all,
    I'm hoping that one of you very knowledgeable individuals may be able to assist me!
    I'm an APEX developer, and I'm trying to make use of Hudson (www.hudson-ci.org) to automate my build process. I can successfully check files out of a source control repository and run them on my database, but I'm falling down when I try to use SQL Developer 3.0 from the command line to execute some unit tests.
    My test environment is a Windows XP SP3 machine running an 11g DB, APEX 4.1 and SQL Developer 3.0. In SQL Developer, I've set up a connection called APPHOME and currently, my unit test repository is on the same connection. If I open a command prompt and execute:
    C:\sqldeveloper\bin>ututil -run -suite -name TEST_PROCEDURE_SUITE -repo APPHOME -db APPHOME -log 1
    It works fine. The suite of tests execute OK, I get UT_SUCCESS back and when I look in SQL Developer, the result is there.
    However, if in a Hudson project I include an instruction that tries to fire exactly the same command, I get a response of: "Connection not found: APPHOME".
    Do I need to do anything special to ensure that ututil will be able to see the connection? The only thing that I can think of is that when I execute ututil from the command line, it does so as the logged in user (me, and I'm the one who has created the connections in SQL Developer) whereas when its fired by Hudson, it is executing as some other user that doesn't have my connections?
    Does anybody have any thoughts about this?
    Thanks in advance!
    Nick

    Hi Nick,
    I think your diagnosis is correct i.e. the connections are specific to your user. To resolve, you can try logging onto the Hudson server as the user that will run ututil, run up sqldeveloper client and import the connections into that user.
    I hope this helps.
    Philip Richens
    SQLDEV Development Team

  • SQL Developer 3.0 Unit Testing

    Hi folks,
    Firstly, let me say thanks for all the hard work that has gone into the improvements made in SQL Developer 3.0. I've been trailing EA3 for the past few days, and am so far very impressed.
    My development team are particularly interested in the improvements made to the Unit Test module. We have previously created a number of tests/test suites in 2.1, but when we select to connect to the old test case repository schema, 3.0 tells me that it can not find the repository. (Apologises, I do not have my development box in front of me, so I can't quote the exact message).
    Is there anything I can do to get it to recognise the old repository? I'd prefer not to have to recreate all of our existing tests...
    Thanks in advance,
    Nick

    Hi Mikka,
    Only simple PL/SQL Records are currently supported i.e. those that do not contain repeating or optional components and where all the components are themselves supported. This restriction is in place due to the fact that we use JDBC as the parameter passing mechanism which does not directly support the PL/SQL Record type.
    ANYTYPE and ANYDATA are not currently supported as they have a dynamic value type and therefore must be programmatically set. In the future, it may be possible to support these through the dynamic value and and validation features.
    This will remain so for the final version.
    Regards,
    Richard

  • SQL Developer 3 EA1: Unit test

    Hi,
    I just started using the unit test frame work in SQL Developer 3 EA 1 and I need some help defining a test case involving parent - child tables that are manipulated using a plsql API. The API for the child table requires the key of a record in the parent table. The parent record, and its key, is created by a test case startup process. The key is retrieved using a dynamic value query in the test implementation. It appears the dynamic value query is executed before the test case startup processes have been executed. Is this expected behaviour? My expectation is the startup processes are executed before the dynamic values query.
    Also, is it possible to use values from the startup processes as parameter values of the test case other than using a dynamic value query?
    Test case summary:
    2 Startup processes: The first deletes all data from parent and child tables. The second inserts in a record into the parent table.
    Zero Teardown processes.
    Test implementation: Dynamic value query that selects the key from the parent table and defines literals for the remaining parameters of the test case.
    1 Process validation: Test whether a record has been inserted into the childe table with the expected values.
    Thanks
    Alistair

    Hi Alistair -
    We execute the dynamic query to control how many times the test (start up, test case, validation, tear down) cycle executes.
    To get the behavior you want, put the test in a test suite and have the test suite start up do the table initialization for you.
    Brian Jeffries
    SQL Developer Team

Maybe you are looking for

  • Win 7 to XP

    I'm having a bit of a weird problem. On an XP node i can remote to Win 7 But the win 7 machine cannot remote to the xp node. From the Win 7 node here is the error message: All nodes are on the same modem or connected via WAN. Renee "MODERN PROGRAMMIN

  • External firewire hard-drive failure

    Hi about two weeks ago I purchased a 250GB Lacie Porsche firewire drive. Everything has been fine, and it is mainly used to auto backup with backup 3. It is usually switched off and unplugged. I came to plug it in last night and turn it on, and the i

  • Desk jet F4280

    The printer is workin but try to scan I get a massage      Sorry, scanner could not be initialized. (Scanner not found.) what is the solution

  • Report Required Variant Configuration

    Hi I need following reports that can provide me the following output with following input: 1. BOM Dependency Assignment Report Input Field: a. Material Number b. Plant c. BOM Usage Output Field: 1. Bom Comp[onent 2. Dependency Name/Component 3. Depen

  • Installing CS4 on new macbook pro gives me error

    Hello I tried to install CS4 again on my new macbook pro and it gives me errors. On my screen is: "AdobeColorCommonSetRGB Error: Error 2." and i have no clue how to fix it. I hope someone can help me here..