Thursday, August 21, 2014

Oracle Webcenter Content: Using page debugger to customize the ucm instance

As you know that Oracle Webcenter Content formerly known as Oracle UCM is content management system which provides many out of box functionality to manage the content of an organization. But some times it happens that you required some features or functionality which is not provided by the product and you need to customize it. Like you need to alter the layout or look and feel, or need to change the functionality of the existing feature however in every case you need to change the source code of the applications or product.
Here in this blog post I am not going to tell you how to customize or add new features or functionality, but I will tell you about debugger that webcenter content provides which may help you in customizing you content server instance.
Well to customize the page it is very important to locate the source code of that feature or component.
For example: let say we need to add a column at folder level (refer my post add column at folder level in ucm)
Here are the steps:

  1. First we need to identify the page to modify the source code.
  2. Now for this you can use the page debugger in ucm to identify the page. Although it is time consuming activity but you have to deal with that (there may be other possibilities but I did like this). To use the debugger you need to append the &IsPageDebug=1 to the url of the page.
  3. In the example I have shown the tender folder page, so right click and copy the link address of this folder and append &IsPageDebug=1 i.e. http://x.x.x.x:16200/cs/idcplg?IdcService=COLLECTION_DISPLAY&hasCollectionID=true&dCollectionID=875446151231000004&&IsPageDebug=1
  4. You will see the page debugger tab at the right-bottom of the page.
  5. On the Debug tab click on "idocscript trace", and then try to look for the page you need to modify. Well I have search for body in that page to locate the page to be modified because generally the content is placed in the body element of a html page and there I got the folders_list_resource.htm page.
  6. Rest you can read it in the blog post (add column at folder level in ucm).

Other Debugging Options

In ucm there are other debugging options like

  • IsJava: Display the local data of a content server page
  • IsSoap: Display the local SOAP data of a content server page
  • For more debugging option go to http://docs.oracle.com/cd/E17904_01/doc.1111/e10726/c07_config_u_and_t.htm#BHAIFFGA

Oracle Webcenter Content: Adding column at folder level in UCM

I was working on one of the requirement asked by client that they need Content ID column at folder level i.e when user move to one folder then Content ID of the content present in that folder should be visible.

What is happening :  see the below figure in which there is no column for Content ID.




What is required :  In the below figure Content ID column is added


Solution:

Well this is not the out of box feature in oracle webcenter content, you have to think to find the source code and edit the source code  manually to achieve this funcationality.
  1. I have found the page i.e. folders_list_resource.htm which contains source code of folder content view shown above (using the debug view in oracle webcenter content).
  2. This file you will find in the folder %MW_HOME%/Oracle_ECM1/ucm/idc/components/Folders_g/resources
  3. In the source code go to line number 75 (in my case) you will find a code some thing like this <$rsMakeFromString("ListFields","dBindingName,dFileSize,dInDate,dDocAuthor","name")$>
  4. In this line add "dDocName"  i.e. <$rsMakeFromString("ListFields","dDocName,dBindingName,dFileSize,dInDate,dDocAuthor","name")$>
  5. Save the file and put back into folder (path specified in Step2).
  6. Refresh the page.

Note: I have done this customization in Oracle UCM 11.1.1.5.0, If there is something different in other version please share.

Thursday, August 14, 2014

Oracle Webcenter Content: Displaying only release content to the user

In Webcenter content when you check in the content, put the user in the user access list or roles in the roles access list and then send the content into workflow then by default user/roles that you have provided at the time of check-in can access the content before the content is approved by the approver. You can restrict this default behaviour but adding the variable in the general configuration of the wcc server i.e.

CollectionReleasedOnly=true

Steps to add the variable.:

  1. In the left navigation under Administration --> AdminServer.
  2. In the component manager window, go to General Configuration and add the CollectionReleasedOnly=true in Additional variable text box.
  3. Save the configuration.
  4. Restart the webcenter content server.

Webcenter Content: Export/Import of Content Server Configuration using Configuration Migration Utility (CMU)

Configuration Migration Utility (CMU) is a useful tool in webcenter content to migrate the wcc configuration from one environment to another. The CMU is installed by default when you installed the webcenter content server or if it is not installed you can install it from the advance component manager.
Configuration migration is a error prone process so while migrating if some components or configuration failed so just mark that component and later on create the configuration manually on to that server. Also it is recommended that if there is a lot of content server configuration so instead of creating one bundle you can go for multiple bundles to complete the configuration migration successful.

Export of Content Server Configuration:
  1. In the left navigation go to Administration -> Config Migration Admin --> configuration templates
  2. In the action menu, select Create New Template.
  3. Under child section, select the content server sections.
  4. Now under the content server sections, select the under child section what you want to migrate.
  5. Now let say we have to migrate content metadata, then click on the content metadata link under Items for section select items to be migrated or you can select all from the Action menu.
  6. From the action menu click save to save the configuration.
  7. In the Add Export Rule window give the name of the template and description of the template.
  8. Repeat step 5 to add more content migration items.
  9. After adding all the items, export the bundle from Action menu.
  10. Copy the Bundle from the server i.e. <CS path>/cmu/<Instance>/bundles/<bundle name>


Import of Content Server Configuration:
  1. In the left navigation go to Administration -> Config Migration Admin --> Upload Bundle
  2. Browse the bundle file, select forced overwrite and click on upload.
  3. In the Action menu click on Import.

Monday, May 12, 2014

Complete testing of log in , Big picture !

Cracking an interview is not a Rocket Science to be frank , but yes for some it could be :D

Lets talk in general , what is the expectation of an interviewer from an interviewee. Interviewer just want the best answer which is unique and different from the rest of the world. Err...What does that mean ?

For each answer there should be an approach which a tester should mention while answering any question. And that is Always Start With Positive approach .!! Be it writing test cases , or reading requirements , executing test cases , thinking of a scenario in testing ,etc

Lets discuss how can we take an approach of writing test cases with an example which is asked in almost all QA - interviews.

How to design test cases for Log-in functionality..?
This is easy .. no ?
Lets try to think in a broader and better way.
Start with open questions :

  1. Why , on earth , user needs to Log into any system ?
  2. Why he would go for log in if:.. he is new to web ?
  3. What he will miss if he does not log into the system ?
  4. Why log is required to anyone ?
  5. What all process he has to go through if he opts for logging in?
  6. What is the process to log into system?
  7. What all credentials are required to get into the system ?
  8. What all basic information check is required to authenticate a user?
Now go more into depth and think more about the architecture as in how MVC will work in this case as Log in is all- web based and service oriented process. So try applying Service Oriented Architecture Concepts:
  1. How service oriented tests can be applied on log in.
  2. How session will be maintained when user log into system.
  3. How session will be maintained when user log out from system.
  4. How session will be maintained when user switch logging in and out from system.
  5. How system will behave when user opens a new tab , after logging into the system.
  6. What kind of response is expected when submit button is hit by system.
What all testing approach you can apply, try thinking as much as you can and categorize your test cases:
Boundary values:
  1. Check length of user name
  2. Check length of password

Equivalent partition
Create a group of test cases including positive cases
  • Enter the correct user-id and password and click on submit button
  • It should display welcome page
and negative cases:
  • Enter the correct user-id and wrong password and click on Submit button
  • It should display error
  • Enter the wrong user-id and correct password and click on Submit button
  • It should display error


Compatibility Testing
  • Check application should work on different Operating systems.
  • Check application should work on different browsers.

Comparison Testing
  • Check application should work on different resolutions.

Usability Testing
  • Check the auto focus of mouse
  • Mouse auto focus should be at UserId
  • Check the password with Lower case and upper case
  • Password should be case sensitive
  • Check the auto focus of mouse
  • Mouse auto focus should be at UserId
Security Testing
  • After login with valid credentials, click on back button
  • The page should be expired
  • After login with valid credentials copy the url and paste in another browser
  • It should not display the user's welcome page
  • Check the password with Lower case and upper case
  • Password should be case sensitive
And others could be :

  • Integration Testing
  • Functional Testing
  • End-to-end Testing
  • Performance Testing
  • Unit testing

There is still lot to test , and testing is a never ending process. So , all I can say Think more , Think Big ,Think Better !!

Thursday, May 8, 2014

Oracle SOA : java.lang.NoClassDefFoundError: Could not initialize class org.apache.myfaces.trinidadinternal.convert.ColorConverter

In Oracle SOA 11g (11.1.1.7.0) when you try to access the oracle worklist application or custom created worklist application to access the Human workflow tasks you get the following error:

java.lang.NoClassDefFoundError: Could not initialize class org.apache.myfaces.trinidadinternal.convert.ColorConverter
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
Truncated. see log file for complete stacktrace

java.lang.UnsatisfiedLinkError: Can't load library: /app1/oracle/middleware/Oracle_SOA1/soa/thirdparty/edifecs/XEngine/bin/headless/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1706)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
Truncated. see log file for complete stacktrace

This is due to the missing "libmawt.so" in /soa/app/Oracle/product/fmw/Oracle_SOA1/soa/thirdparty/edifecs/XEngine/bin/headless

Solution:

Copy the libmawt.so library file from the JRockit installation directory (normally found in /lib/headless/) to the following directory:
%Middleware_HOME%/Oracle_SOA1/soa/thirdparty/edifecs/XEngine/bin/headless/

Note: Please refer document (Doc ID 1633015.1) on oracle support for further information.

Monday, May 5, 2014

Oracle SAP Adapter : ERROR com.ibi.bse.ConfigWorker:java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException

I was working on a SAP integration with Oracle SOA Suite, configuring the Oracle Application Adapter for SOA. Then after starting the ae.cmd ( E:\Oracle\Middleware\Oracle_SOA1\soa\thirdparty\ApplicationAdapters\tools\iwae\bin\ae.cmd ) I am getting the following exception:

ERROR com.ibi.bse.ConfigWorker:java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException

This is due to the missing libraries i.e jca-binding-api.jar and adapter_xbeans.jar

Solution:

  1. Copy the missing libraries i.e. jca-binding-api.jar and adapter_xbeans.jar from the location "E:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.adapter_11.1.1"
  2. Paste the copied files into the folder i.e. "E:\Oracle\Middleware\Oracle_SOA1\soa\thirdparty\ApplicationAdapters\lib"