Suggestions requested for Unit Testing process and build processes.

Hi All,
We are using WebLogic WorkShop 8.1 SP2 to build our WebApp. One thing I am trying
to get together is a "Best Practises" list for aspects of WorkShop developement,
particularly Unit Testing, Continous Build methodology, source control management
etc.I have been through the "Best Practises Guide" that comes in WorkShop help,
but it doesnt address these issues.This could help us all for future projects.
1)Could anyone give pointers on how to perform Unit Testing using either JUnit/JUnitEE
in the WorkShop realm, given that Controls cannot be accessed directly from PO
Test classes.
2)For a project of size say 5 developers ,does it make sense to have a nightly
build using tools like CruiseControl?We use CVS for our source control and its
working out pretty well, but given that we currently have no Unit Tests that can
be run after the build and that can provide some reports on what broke/what didnt?
I am sure we all would appreciate any suggestions and more questions on this topic.
Thanks,
Vik.

Hi, Chris,
can you perhaps explain your solution in greater detail. I am really curious to
find a way to test controls.
"Chris Pyrke" <[email protected]> wrote:
>
I have written (well it's a bit of a dirty hack really) something that
lends itself
to the name ControlTest (it unit tests controls). Its a blend of Junit
and Cactus
with some of the source of each brutalised a bit to get things to work
(not much
- it was a couple of hours work, when I was supposed to be doing something
else).
To write a control test you code something like...
package com.liffe;
import com.liffe.controlunit.ControlTestCase;
import controls.Example;
public class TestExample extends ControlTestCase
private Example example = null;
public void setUp() {
example = (Example)getControl("example");
public void testExample() {
this.assertNotNull(example);
String result = example.getData();
assertEquals(result, "Happy as Larry");
Other tasks required to set up a test are creating a web project with
a jpf which
needs some cut and paste code (14 lines) in its begin method and a jsp
which is
also cut and paste (5 lines). (ie create a standard web project and paste
in 2
pieces of code)
In the web project you need to create a control (A) with an instance
name of controlContainer.
(if it's called something else the pasted in code will need changing
to reflect)
In this control you need to put an instance of TestContainerImpl and
any controls
that need testing.
You then need to add a method to the control (A) that looks like…
* @common:operation
public String controlTestRun(String theSuiteClassName, boolean xsl)
container.setControl("example", example);
return container.controlTestRun(theSuiteClassName, xsl);
You need to call container.setControl for each control being tested and
the object
'container' is the instance name of the TestContainerImpl that was put
in.
There are 4 jars (junit, cactus etc) that go in the library. You will
also need
the ControlUnitBase project (or maybe just it's jar).
To use you call a URL like:
http://localhost:7001/TestWeb/Controller.jpf?test=com.liffe.TestExample
TestWeb is the name I gave to my web project - this will be different
for each
test project
com.liffe.Example is the class above and will therefore be different
for each
test case.
You can also call
http://localhost:7001/TestWeb/Controller.jpf?test=com.liffe.TestExample&xsl=true
(Note the extra &xsl=true) and the browser will (if it can) render it
more prettily.
This seems to do the job quite nicely, but there are several caveats
I would hope
someone from bea would be able to address before I start using it widely.
1) To access the control you need to create it (eg as a subcontrol in
the control
(A) above.
To get it into the test case you need to pass it round as an Object (can't
return
Control from a control operation). As it's being passed around among
Java (POJO)
classes I'm assuming that control remains in the control container context
so
this is OK. It seems to work and the Object is some form of proxy as
any control
seems to be reproxied before the control is invoked from the test case.
2) If I'm testing controls called from a JPD then they either need to
be in a
control project (and my test cases called from a Web Project) which makes
for
a large increase in project numbers (we already have this and are trying
to resist
it) To avoid this - as a process project is a brain damaged web project
I simply
perform some brain surgery and augment the process project with some
standard
files found in any old web project. this means I can call the test JPF
from a
browser. This seems nasty, is there a better way?
3) I would like to be able to deliver without the test code. At the worst
the
code can be in place but must be inacessible in a production environment.
I don't
know how best to do this - any suggestions (without creating lots of
projects,
or lots of manual effort)
If anyone has read this far I would ask the question does this seem like
the kind
of thing that would be useful?
Hopefully a future version of workshop will have something to enable
unit testing
and this hacking will be unnecessary.
Could someone from BEA tell me if this is a dangerous way to do things?
Chris
"vik" <[email protected]> wrote:
Hi All,
We are using WebLogic WorkShop 8.1 SP2 to build our WebApp. One thing
I am trying
to get together is a "Best Practises" list for aspects of WorkShop developement,
particularly Unit Testing, Continous Build methodology, source control
management
etc.I have been through the "Best Practises Guide" that comes in WorkShop
help,
but it doesnt address these issues.This could help us all for future
projects.
1)Could anyone give pointers on how to perform Unit Testing using either
JUnit/JUnitEE
in the WorkShop realm, given that Controls cannot be accessed directly
from PO
Test classes.
2)For a project of size say 5 developers ,does it make sense to have
a nightly
build using tools like CruiseControl?We use CVS for our source control
and its
working out pretty well, but given that we currently have no Unit Tests
that can
be run after the build and that can provide some reports on what broke/what
didnt?
I am sure we all would appreciate any suggestions and more questions
on this topic.
Thanks,
Vik.

Similar Messages

  • Support for unit testing object types

    There's a Feature Request that suggests expanding the unit test tool to object types:
    Title
    Provide object type support for unit tests
    Description
    In the current version (2.1.0.63) I can perform only unit test for packages, function and procedures. But we use a lot of object types in the database and would like to test them. When is a support for object types scheduled?
    Average Rating
    10
    Development Comment
    This is planned for the next release.
    Status
    Scheduled for 3.0
    Although the status suggests inclusion in v3, in my current version 3.2.20.09 there is nothing.
    This is clearly an important issue for those who have voted for it as it scores a perfect 10 on average rating.
    Is there any sign of object types being supported in the 4.0EA1 release? There is a strong desire within my organisation to move to a more object-based approach to PL/SQL coding but until we are able to unit test easily there will be no real progress.

    If you are ready to learn a little bit of Ruby then you can try [PL/SQL unit testing with Ruby|http://blog.rayapps.com/2009/11/27/oracle-plsql-unit-testing-with-ruby/]. ruby-plsql library [supports also PL/SQL object types|http://blog.rayapps.com/2009/11/25/more-oracle-data-types-supported-by-ruby-plsql-gem/] as input and output parameters and return values.

  • [svn:osmf:] 11045: Increasing timer interval in attempt to fix unit test on the build server.

    Revision: 11045
    Author:   [email protected]
    Date:     2009-10-21 02:32:45 -0700 (Wed, 21 Oct 2009)
    Log Message:
    Increasing timer interval in attempt to fix unit test on the build server.
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/composition/TestParallelViewableTrai t.as

    In general theory, one now has the Edit button for their posts, until someone/anyone Replies to it. I've had Edit available for weeks, as opposed to the old forum's ~ 30 mins.
    That, however, is in theory. I've posted, and immediately seen something that needed editing, only to find NO Replies, yet the Edit button is no longer available, only seconds later. Still, in that same thread, I'd have the Edit button from older posts, to which there had also been no Replies even after several days/weeks. Found one that had to be over a month old, and Edit was still there.
    Do not know the why/how of this behavior. At first, I thought that maybe there WAS a Reply, that "ate" my Edit button, but had not Refreshed on my screen. Refresh still showed no Replies, just no Edit either. In those cases, I just Reply and mention the [Edit].
    Also, it seems that the buttons get very scrambled at times, and Refresh does not always clear that up. I end up clicking where I "think" the right button should be and hope for the best. Seems that when the buttons do bunch up they can appear at random around the page, often three atop one another, and maybe one way the heck out in left-field.
    While I'm on a role, it would be nice to be able to switch between Flattened and Threaded Views on the fly. Each has a use, and having to go to Options and then come back down to the thread is a very slow process. Jive is probably incapable of this, but I can dream.
    Hunt

  • Unit testing, integration and functional testing

    Hello all,
    I would like to know the difference between Unit testing, integration and functional testing. And also what are the testing tools that are more commonly used?
    Thanks,
    Maxx

    Hi,
        Unit testing :
                    A complete cycle of each  module will be tested
                    ie for PP Right from requirements to planned orders /production orders
                    confirmation .
        Integration testing:
                    Here cross module testing will be carried out.
                     ie PP and MM integration
                        After confirming production order a GR is made /billing is carried out
                        and delivered.
          Functional testing:
                    This testing is carried out to see whether the system can with stand l the loads during processing by users.
                    Stress test and volume test.
                Regards,
                nandha

  • Better UI for Unit Tests

    I've been doing a lot of unit tests lately.  Right now I'm working on a code converter Air app and I'm constantly creating unit tests for bugs I'm finding and running them, and debugging them when they don't work.  When I debug, it's easiest to isolate the runner to run only one test.  I know I can do that by editing the source file and typing in the test name in the core.run call.  However, I can't help by think a better UI is needed for doing this form for TestDriven Development. 
    Basically, what I think would be perfect, is to have the UI, not run the tests initially.  It should provide you with a list of tests with checkboxes.  Then give you the opportunity to select which ones you want to run, and then run them.  It should also have the ability to re-run a test.  I realize that for any code changes to take affect you would need to re-run the entire app, but a lot of times, I find myself running the same test over and over and stepping through the code with the debugger in order to figure out what's going on.  Then I eventually change the code.
    Also, the new UI should persist the last set of selected tests, and maybe have a way to store previous selections.  That would make it perfect for how I use it. 
    Does anyone agree or disagree with this?  Has someone done this already?
    BTW, the reason I'm using the stand alone runner and not the one in Flash Builder 4 is because I've run into some bugs with the FlexUnit shipped with Flash Builder 4 and there doesn't seem to be a way to get the latest FlexUnit 4.1 to work properly with Flash Builder 4.  There seems to be a way to do it with Flash Builder 4.5, but I don't have that version.
    Thanks,
    Mark

    On 05/08/2012 03:56 PM, prakash jv wrote:
    > We have been looking for unit test framework for unit testing SWT
    > components in our RCP application developed in eclipse galileo 3.5.
    >
    > We found SWTBot supports the better UI testing and wanted to additional
    > details reagrding its support for maven 2.2.1.
    >
    > Does SWTBot work with projects which are mavenized with maven 2.2.1?
    >
    > Our aim of adding the unit tests for UI components is for better build
    > quality. So we would want these Unit tests to be run everytime we build
    > our assembly. As of now we use Junit4 for running our JUnits and they
    > run with maven outside eclipse.
    >
    > Does SWTBot support running the UI unit tests outside eclipse using maven?
    Hi
    in
    http://code.google.com/a/eclipselabs.org/p/emf-components/
    we run swtbot tests with maven/tycho
    hope this helps
    cheers
    Lorenzo
    Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
    ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
    HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
    http://www.myspace.com/supertrouperabba
    BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
    http://www.gnu.org/software/src-highlite
    http://www.gnu.org/software/gengetopt
    http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net

  • Problem creating unit testing repository (and workaround)

    I tried to create the unit testing repository with a user that had all the required system privileges granted through a different role other than RESOURCE and CONNECT roles, and who wasn't explicitely granted CREATE VIEW, but inherited it through the custom role. However the check in SQL Developer is explicitely for the RESOURCE and CONNECT roles (regardless of what privileges they have granted to them in whichever database version past, present or future) and for CREATE VIEW privilege granted direct to the user:
    SELECT DECODE (roles.required_role_count + privs.required_priv_count,
                   3, 1,
                   0)
              AS basic_privs_granted
      FROM (SELECT COUNT (*) AS required_role_count
              FROM user_role_privs
             WHERE granted_role IN ('CONNECT', 'RESOURCE')) roles,
           (SELECT COUNT (*) AS required_priv_count
              FROM USER_SYS_PRIVS
             WHERE privilege IN ('CREATE VIEW')) privsI found this SQL contained within the sqldeveloper/extensions/oracle.sqldeveloper.unit_test.jar in an XML file: oracle/dbtools/unit_test/manage_user/UserSql.xml and replaced the SQL with one that actually checks for the specific system privileges:
    SELECT DECODE (required_sys_priv_count,
                   10, 1,
                   0)
              AS basic_privs_granted
      FROM
           (SELECT COUNT(*) AS required_sys_priv_count FROM
             (SELECT privilege
                FROM role_sys_privs
               WHERE privilege IN ('CREATE CLUSTER','CREATE INDEXTYPE','CREATE OPERATOR','CREATE PROCEDURE','CREATE SEQUENCE','CREATE SESSION','CREATE TABLE','CREATE TRIGGER','CREATE TYPE','CREATE VIEW')
              UNION
              SELECT privilege
                FROM user_sys_privs
               WHERE privilege IN ('CREATE CLUSTER','CREATE INDEXTYPE','CREATE OPERATOR','CREATE PROCEDURE','CREATE SEQUENCE','CREATE SESSION','CREATE TABLE','CREATE TRIGGER','CREATE TYPE','CREATE VIEW')))This enabled me to bypass that check when creating the respository. I don't know if all these privileges are actually required by the unit testing repository or not, so maybe the above list can be reduced...
    Edited by: RDB on Mar 1, 2013 2:24 PM

    Hi Sai Vineeth,
    First of all, I appreciate your elaborate way of framing the question. That itself helps others to comment.
    On the first two questions, I am sure you'll be able to follow the answers provided and take care of your concerns.
    On your question 3), an additional piece of information that should bring smile to you
    Whether the Test is to happen in DEV or QAS or whatever 'System Role' is dependent on the Test Plan.
    So, if you have two distinct Test Plans, one for Unit Tests and the other for Integration Tests, which should be the case, as usual, you can certainly point the System Role to DEV or QAS as required.
    Feel free to pose any other query as well.
    Best regards,
    Srini

  • Error while TOC created when change document  approvle for UNIT testing

    Hi All,
    During change document approval for unit testing, we are getting error, when I checked in detail, it is giving error for transport of copies error as below
    it seems to be getting locked with original transport,
    also I can't see change in transport of copies
    Does someone has any idea?
    Dinesh

    Hello Dinesh,
    Perhaps the tasks of the Transport Request were not released.
    Try to release the tasks only (from your DEV system), then choose action "Pass normal change to test". This will generate a ToC to be transported into your QAS.
    Then from the Task List, you can schedule the background job to import the ToC into QAS system.
    Regards,
    Daniel

  • Roles for unit test

    Hi all,
    I need to create users and assign role for unit test client. But I do not known which roles  I have to assign to them. If you know, pls tell me.
    Thanks alot.

    Hello,
    it depends on what they want to test. You cannot give SAPALL for them.
    Create users in SU01
    Create roles in PFCG
    Mass change users in SU10
    Regards,
    Ravi

  • [svn:osmf:] 15899: Attempted fix for unit tests failure.

    Revision: 15899
    Revision: 15899
    Author:   [email protected]
    Date:     2010-05-04 17:21:06 -0700 (Tue, 04 May 2010)
    Log Message:
    Attempted fix for unit tests failure.
    Modified Paths:
        osmf/trunk/framework/OSMFTest/org/osmf/OSMFTests.as

  • HT1386 we are using same laptop with my wife for our 2 iphones and when sincronizing, she's getting my apps and is requested for my apple id and password when getting a new app on her device. How can i fix that issue?

    we are using same laptop with my wife for our 2 iphones and when sincronizing, she's getting my apps and is requested for my apple id and password when getting a new app on her device. How can i fix that issue?

    Each phone needs to set its own sync settings on the various tabs in iTunes.  On the Apps tab, for example, uncheck the apps that you don't want on the phone being synced.  This article may also be of interest: http://gigaom.com/apple/itunes-101-multiple-devices-one-itunes-account/.
    You can change the Apple ID used for purchasing on her phone by going to Settings>Store>Apple ID, tap the ID shown, sign out, sign back in using her Apple ID.  However, be aware that if she has any apps on her phone purchased with your Apple ID she will still be prompted to enter the password associated with this ID for all future updates of these apps.  This is because apps are permanently tied to the Apple ID used to purchase them, regardless of the ID in Settings>Store.

  • Tool for Unit Testing

    Hi,
    Is there any tool for unit testing.
    Thanks
    krish

    Hi Krish,
    Check the below help file for testing.
    http://help.sap.com/saphelp_nw04/helpdata/en/1b/e81c3b84e65e7be10000000a11402f/frameset.htm
    Hope it helps.
    Regards,
    Raghu

  • AR process and Sub process documentation

    Hi,
    I am working on AR process and sub process …Can any one please mail me the   documentation / links on
    AR high-level process &and AR sub process like….
    Manual invoicing (where there is no SD invoice)
    Direct debit Process,
    Automatic matching of Incoming payments,
    Remittance advice/ payment advice,
    Debit Not process & credit note process
    Electronic Bank Statements
    User exits (on payment advice)
    Credit managment process
    Points will be awarded accordingly
    MY mail id is [email protected]
    Thanks
    Sireesha

    I would suggest reading the pdf files from Siemens.
    you can also find some files in www.easymarketplace.de
    but the best thing to do would be to practise a lot in a test system and get the overview from people who worked in AR for atleast 6 months....
    the pdf files, though they are comprehensive are very intricate and never explain the entire business scenario in simple words..

  • Business process and sub process in CUP & ERM

    Hi,
    We have created Business Processes and Sub- Processes in ERM. But we are not able to view the same when we create a request in CUP.
    We have created the Business Processes and Sub- Processes for CUP in Roles -Attributes.These were then visible in the request.
    Do we need to create the Processes and Sub-processes independently in both ERM and CUP or should it flow into CUP when roles are imported into CUP from ERM ?
    Thanks and Regards.

    Another important point:
    In CUP, Sub Processes are optional, in ERM they are mandatory.
    Please make sure you have some in CUP for all your processes.
    Frank.

  • Concept of Sub Process and Starter Process in BPEL

    Hi Forum -
    With my limited understanding of BPEL I have found that if a process has to interact with another process it has to be exposed as a service however that is not good in all cases.
    Is there a way in BPEL where once can create a process and do not expose it as service and still be able to call it from another BPEL process.
    For example there can be a process called sendNotification and all the other processes if they want to send a notification can call this process.
    In TIBCO there is a concept of Starter Process and Sub Process. A Starter Process is a process which will wait for an event to take place, like a web service request or a JMS message or a database adapter event and then this main process can call a sub process, just like the main program calling a function. This sub process need not be defined as a service in TIBCO and it can still accept an xml schema type as input.
    Is this possible in BPEL?
    Thanks!

    10g -> Every process is a service.
    11g -> Create a Composite, You could wire multiple BPEL Components and expose only the desired ones as a service through a mediator or directly the bpel. Mediator provide one more layer of virtualization and hides even the first master bpel component.
    But if the send notification have to be reused outside the composite, it has to be an exposed service. Although it is exposed as a web service, it uses only WSIF binding to interact between bpel processes and not a soap binding(unless specifically instructed).
    If you are looking for function kind of construct, you could create custom xpath functions (like logging etc.)
    -Sridhar

  • Using CREATE PROCESS and START PROCESS in a JSP

    Hi,
    I have built a simple JSP page. I want to call my workflow program from this page.
    How should I use the CREATE PROCESS() AND START PROCESS() inside the JSP page?
    Also I want to get the value entered in the text field (which will be a hidden field) to be passed to the ITEM_ATTRIBUTE, which I have defined in my program. How can this be achieved?
    Please give me the syntax for this.
    Please find below the JSP page
    =========================================================
    <%@page import= "java.util.Date" %>
    <script language="javascript" src="ibeCButton.js"> </script>
    <html>
    <head>
    <title>First Page</title>
    </head>
    <body>
    <H3>Today is:
    <%= new java.util.Date() %>
    <INPUT TYPE="text" NAME="CART_ID">
    <INPUT TYPE="submit" onclick = >
    </H3>
    </body>
    </html>
    ==========================================================
    To use LAUNCHPROCESS in JSP, the following is the syntax.
    public static boolean launchProcess
    (WFContext wCtx,
    String itemType,
    String itemKey,
    String process,
    String userKey,
    String owner)
    Should WFContext have the connection information of the DB.
    If I pass only the WFContext and itemType attributes are they enough? Please let me know.
    Thanks

    There are two options.
    1. Good one.
    Include wf*.jar files in your system CLASSPATH. Use oracle.apps.fnd.wf.engine.WFEngineAPI class to access engine APIs. You would need to pass WFContext for which you need WFDB.
    You basically created WFDB with username, password and connect string. Pass it to WFContext and use it for all Workflow Engine APIs.
    2. OK one.
    You can get JDBC connection using the default mechanism that your custom Java and JSP code could be using. Call the PLSQL procedures WF_ENGINE.CreateProcess and WF_ENGINE.LaunchProcess over JDBC.
    Anyways option 1 makes life easier.

Maybe you are looking for

  • Internet sharing not working on my Macbook Pro

    I am trying to connect my DSi to the internet using the internet sharing on my mac since I am at school. I successfully connected it last year but am having no luck this year. I used this website (http://hints.macworld.com/article.php?story=200511191

  • 80gb Issue syncing/poss hdd fault

    Hi guys Firstly I would like to apologise if the problems i am having have been covered but i am getting really fed up over my iPod. About 8 months ago I went to sync my iPod with iTunes when it came up with errors, sync error -48, corrupt drive, can

  • APE8 worked OK with mp4 files, not doesn't recognize

    I started a project last fall and brought all my .jpg stills and all the .mp4 HD video from my camera into Premiere Elements 8.  I used organizer to create folders by location and put all relevant stills and video into the folders. Everything played

  • Accessing my original account

    http://www.pinterest.com/pin/create/extension/Hello, I have had a Behance account for awhile and had several projects listed there. I must not have done something right when you were bought by Adobe and recently when I tried to log in, it made me cho

  • QuerySummary() function is behaving weirdly in BI4.1 SP1

    Hi There, Any Idea/anybody came across the below issue if you migrate your existing 3.1 reports to 4.1 SP1 If I use QuerySummary() function in the report using pre-defined cell then, the resultant object names its displaying correctly, but in the Fil