Wednesday, August 31, 2011

Oracle Application Framework Developer's Guide (pages 1441-1442)

Oracle Application Framework Developer's Guide (pages 1441-1442)

When you take advantage of accelerated validation, each user gets a unique encryption key for their session. For tools such as Load Runner, where content generated for one user needs to be replayed for another user, the unique encryption key poses a problem because the generated URL changes each time a page is accessed. OA Framework provides fixed key 
support to work around this issue by allowing certain users to have a fixed encryption key for all their user sessions.
To enable fixed key support, set the profiles FND: Fixed Key Enabled and FND: Fixed Key. The profile FND: Fixed Key Enabled allows you enable the use of a fixed encryption key for accelerated validation for a user. If you enable this profile, you can then use the FND: Fixed Key profile to specify what that fixed key is for the user.
Load Runner users should set the FND: Fixed Key Enabled profile to Y at their user level and also specify a value for their FND: Fixed Key profile.

Usage Notes

1.             Due to an issue in AOL/J for guest sessions, please set the fixed key profiles so that fixed key support is enabled for the guest user "GUEST".
2.             Successful fixed key support assumes that URLs remain the same across sessions. This includes having a consistent transactionID parameter in the URL. Using a transactionID generated from an   
          earlier run of Load Runner should not affect results.

3.             You should always encrypt URL parameters using OA Framework provided mechanisms, such as token substitution and OAPageContext.encrypt. This ensures that the fixed encryption key is used, if enabled. If you encrypt a parameter by calling OAPageContext.encrypt and then pass in a different key, the URL constructed will not be consistent and as a result, the URL integrity will fail, causing the Load Runner usage to fail for this page.

Using LoadRunner on release 12

This summary is not available. Please click here to view the post.

What is the difference in running Vusers as processes versus threads? What are the advantages of one versus the other? Is it possible to change this setting?

More thread Vusers can run on a machine
When running the Vuser as a process, LoadRunner will create 1 process per Vuser. So if you have 50
Vusers, you will have 50 mdrv.exe processes on your machine
When running the Vuser as a thread, LoadRunner will create 1 thread per Vuser. So if you have 50
Vusers, then you will have 1 process with 50 threads running inside it if the limit is 50 threads per
process.
Prior to LoadRunner7.6:
The default is 50 vusers per thread. This has proven to give the best performance with stability.
If you run into stability issues, it might pay to lower the number of threads per process to 10, and
see if that helps. You can modify this from the Controller -> Tools -> Expert Mode -> Tools ->
Options -> Agent -> Max Threads for Driver
LoadRunner7.6 and above:
The option for modifying "Max thread per driver" is no longer available in the Controller's UI.
Thread per driver is now fine tuned for each protocol and user is not recommended to change
this setting.
To start a process or thread on a system, there will be several modules being loaded on to the memory.
For a process:
program counter - identifying next instruction to execute.
processors register set - contains register values.
text segment - contains code section.
data segment - contains variable content.
stack segment - contains temporary data such as subroutine parameters, return addresses, temporary
variables.
For a thread:
The text segment and the data segment are being shared by multiple threads within 1 process. Each
thread will have its own allocation for the rest of the module.
That is why you will be able to run more Vusers as threads than as processes since less memory
resources are being taken. By default, most of LoadRunner Vuser's is set to run as a threads unless
they are not thread safe . There is, however, a trade off on running vuser as a thread. The more
threads in a process, the more unstable the system.

Thursday, August 18, 2011

SharePoint 2010 Pre-Population powershell script

*** From Arian Nevjestic's Blog***

http://blogs.technet.com/b/anevjes/archive/2010/03/01/sharepoint-2010-pre-population-powershell-script.aspx

Peeps, firstly apologies for the lack of blogging from my end. Work and other commitments have kept me very busy over the last couple of months. In an attempt to spice up my blog site; today I will share with you a SharePoint 2010 data pre-population PowerShell script which I have written for some performance testing tasks I am working on currently with my colleagues @ Microsoft Consulting Services.
I needed a tool which could generate the following SharePoint data for me:
·         Create various Web Applications
·         Each Web Application to have multiple site collections spread across two content databases.
·         Pre-populate each site collection’s document library with uniquely named documents.

So here is the PowerShell script that performs exactly the above. I have tried to write it a very simple manner so that you can re-use it for your needs.


Set-ExecutionPolicy Unrestricted
Add-PSSnapin microsoft.sharepoint.powershell




#USER Defined Variables
$siteCollTemplate = "WIKI#0"
$webAppProtocol ="http://"
$WebAppsToCreate = @("arianwin2k8:700","arianwin2k8:710")
$numSiteCollectionsPerWebApp =5
$OwnerAlias = "arianwin2k8\Administrator"
$docLib = "AnalyticsReports"
$fileSource = "C:\UploadFiles"
$appPoolExt = "App_Pool"
# DO not edit anything beyond this line



function SPContentUpload {
#my document upload function to a sharepoint doc library.
param ([string]$urlDocLib,[string]$urlSPWeb,[string]$strDirPath)
$hshDocProps=@{"ContentType"="Document"}
[void][System.Reflection.Assembly]::LoadWithPartialName(”Microsoft.SharePoint”)
$SPsite=new-object Microsoft.SharePoint.SPSite($urlDocLib)
$SPweb=$SPsite.openweb($urlSPWeb)
#loop through all the files in the source folder and add each file to the defined SharePoint doc library
dir $strDirPath | foreach-object {
               $bytes=get-content $_.fullname -encoding byte
               $arrbytes=[byte[]]$bytes
               $SPWeb.files.Add($($urlDocLib +$docLib"/") + $_.Name + [guid]::newGuid().tostring(),$arrbytes,$hshDocProps, $true)
}
$SPSite.Dispose()
}

#[guid]::newGuid().tostring()
$b=1
foreach ($webApp in $WebAppsToCreate) {


$Split=$webApp.split(":")
$webAppUrl=$Split[0]
$webAppPort =$Split[1]
Write-Host Web App Url $webAppUrl $webAppPort


$webAppUrlFull="$webAppProtocol$webAppUrl"


New-SPWebApplication -Name $($webAppUrl + " Web Application" + $b) –URL $webAppUrlFull -port $webAppPort -ApplicationPool "$($webAppUrl + "_app_Pool" + $b)" -ApplicationPoolAccount $OwnerAlias -DatabaseName $($webAppUrl + "_" + $webAppPort)


Write-Host Web App Url $webAppUrlFull
#Create new content db
#New-SPContentDatabase $webAppUrl -WebApplication $webAppUrlFull
New-SPContentDatabase $($webAppUrl + "_" + $webAppPort + "_2") -WebApplication $($webAppUrlFull + ":" + $webAppPort)
$b++
$i=1
do {


$siteCollPath = $($webAppUrlFull + ":" + $webAppPort + "/sites/" + $i)
$siteCollPath2 = $($webAppUrlFull + ":" + $webAppPort + "/sites/" + $i + "_")
Write-Host Creating site collection $siteCollPath
#create site collection to go to unique content database
New-SPSite -url $siteCollPath -OwnerAlias "$OwnerAlias" -Name "Test Wiki content db_1_ $i" -Template $siteCollTemplate -ContentDatabase $($webAppUrl + "_" + $webAppPort)


#populate Doc lib for above site collection
SPContentUpload "$($webAppUrlFull + ":" + $webAppPort + "/sites/" + $i + "/")" "" "$fileSource"


#create site collection to go to sep content database
New-SPSite -url $siteCollPath2 -OwnerAlias "$OwnerAlias" -Name "Test Wiki content db_2_$i" -Template $siteCollTemplate -ContentDatabase $($webAppUrl + "_" + $webAppPort + "_2")
#populate Doc lib for above site collection
SPContentUpload "$($webAppUrlFull + ":" + $webAppPort + "/sites/" + $i + "_/")" "" "$fileSource"
$i++
}
while ($i -le $numSiteCollectionsPerWebApp)
}



Hope you can find some good use from this. I will try and blog more regularly, especially when I come across some interesting issues / client requirements around SharePoint 2007 / 2010.

Friday, August 12, 2011

SharePoint Server 2010 performance and capacity test results and recommendations

These White papers describe the performance and capacity impact of specific feature sets included in Microsoft SharePoint Server 2010

HP Sizer for SharePoint 2010

HP Sizer for SharePoint 2010 – Microsoft had a sizing tool for 2007, but the tool is not available for 2010. However, there’s tool available from HP.

References of Real life performance testing to get the bench mark results

References of Real life performance testing to get the bench mark results

There are many times when you do performance testing in your environment, but don’t know if your results are good or not. The links in this section would help you in finding that.
  • Performance and capacity test results and recommendations section provides a series of white papers describing the performance and capacity impact of specific feature sets included in Microsoft SharePoint Server 2010. These white papers include information such as: Test farm characteristics, Test results, Recommendations and Troubleshooting performance and scalability. The papers released at present are available for download here and are about these areas:
    • Access Services
    • Business Connectivity Services
    • Caches
    • Excel Services
    • InfoPath Forms Services
    • Large Lists
    • Large-scale document repositories
    • My Sites and social computing
    • Office Web Apps
    • PerformancePoint Services
    • Search
    • Visio Services
    • Web Analytics
    • Web Content Management
    • Word Automation Services
    • Workflows
  • More to come ….

Testing Tools

  • Load Testing Toolkit (LTK) – Microsoft has released this kit to assist an administrator to certify that an existing Microsoft Office SharePoint Server 2007 topology running on specific hardware can sustain an upgrade to a Microsoft SharePoint Server 2010 farm, with the same load. Hence, it’s NOT something that you can use for a new installation of SharePoint 2010, but you can always use the webTests created for another implementation as reference for a new implementation. Also, it uses VSTS 2008 and NOT 2010. This comes as part of SharePoint 2010 Administration Toolkit and you’ll need to download the admin toolkit to get the LTK. 

Performance Testing Guidelines specific to SharePoint 2010

Performance testing for SharePoint Server 2010 - The technet article provides comprehensive guidelines on how to go about planning to executing performance testing on SharePoint 2010. It provides useful information, pointers and guidelines on different aspects of performance testing - creating test plan, creating test environment, creating tests and tools. It has tips on some of important aspects such as whether to use think time or not, whether to enable parse dependent requests or not, whether to track virtual users or RPS etc.

Monitoring and maintaining SharePoint Server 2010 - Though the article is about general monitoring, but you can also use it to monitor your servers while performance testing. It provides useful information on what performance counters you should monitor, and what should be reasonable values. However, be aware that list of counters provided here is not the complete list of counters that you would need to analyse SharePoint 2010 performance. For example, the article does not provide info about very important counters about different kinds of cache - output, blob, object cache.

Thursday, August 11, 2011

Porting Oracle EBS scripts between environments

Porting Oracle EBS scripts between environments
A common situation is that you must develop scripts in one environment but conduct testing in another. This requires that your scripts be portable across environments.

Practical Solution:
There are several values that need to be parameterized in order to make your scripts portable. Parameterize and test these as early as possible to avoid frantic porting at test execution time!

The values to parameterize are:
1. Base url or app server ip
2. Web server port number which you initially connect to for login authentication
3. Forms server port number, which the nca_connect sues to connect to the Forms server
4. Configuration (“config” value in nca_connect)
5. Module (second ‘path’ value in nca_connect)

Examples of where these are used:
/*initial Oracle launch*/
web_browser("ebsr12.com:9097",
DESCRIPTION,
ACTION,
"Navigate=http://{app_srv}:{port_web}/",
LAST);
/*Forms server connect*/
nca_connect_server("{app_srv}", "{port_forms}",
"module=/ebstop/{module}/apps/apps_st/appl/fnd/12.0.0/forms/US/FNDSCSGN fndnam=APPS
record=names config='{config}' icx_ticket='.{p_ICX_Ticket}..'
resp='AR/CAN_CUSTOMER_MASTER_ADMIN' …");

Failure to recognize certain new java objects on record

Failure to recognize certain new java objects on record

QTP has issues recording an R12 object called an ITEMTREE which was a list of expandable items that
look like this:
+40907824 ITEM1
+40907839 ITEM2
The following statements resulted after selecting an item during recording, but these would not play back:
nca_tree_select_item("ITEMTREE_ITEMTREE_0", "40907824 ITEM1 ");
nca_tree_activate_item("ITEMTREE_ITEMTREE_0", "40907824 ITEM1 ");
If you encounter this object, or any other new object that vugen has trouble with, this tip may get you around the recording limitation.


Practical Solution:
We used QuickTest Pro’s ObjectSpy to examine the ITEMTREE object and found that each menu item had a reference number that is selectable and plays back correctly. We then modified the VUgen code with the correct reference numbers:
nca_tree_select_item("ITEMTREE_ITEMTREE_0", "409");
nca_tree_activate_item("ITEMTREE_ITEMTREE_0", "409");

This reference number is listed in the detail log files if you look carefully but they were not obvious during recording, but we recommend using ObjectSpy if you encounter any other objects that VUgen doesn’t handle correctly.

Playback failure on nca_object_action statements

Playback failure on nca_object_action statements

Following the nca_connect statement there are two statements of this form:
nca_java_action("SR_DUP_GRID_DUP_GRID_0",…) on playback, the script invariably fails at the first of these.

Practical Solution:
In each script directory, open the default.cfg file and in the [NCA_GENERAL] section add this line:

NCATimerWaitMode=0

Playback will now successfully process nca_object_action statements.

The correlation of ICX_Ticket is different from 11i

The correlation of ICX_Ticket is different from 11i

In 11i, the correlation rule to correlate the key Oracle Forms session id, ncx_ticket, yields a web_reg_save_param statement with these left and right boundaries:
web_reg_save_param("p_ICX_Ticket", "LB=icx_ticket=", "RB=’",LAST);

In R12, a new suffix appears on the LB and a there is a new RB:
web_reg_save_param("p_ICX_Ticket", "LB=icx_ticket&gv15=", "RB=..&",LAST);

Practical Solution:
In the Recording Settings, modify the OracleApps ‘icx’ correlation rule with the above LB and RB to enable vugen to properly correlate icx_ticket automatically.

Java Runtime version and memory setting

: Java Runtime version and memory setting

Oracle R12 now loads the JInitiator file (runtime program for executing the Oracle java applet) from the Java JRE, instead of downloading it during the Oracle initialization process or installing it on your PC separately. Also, Forms 10g needs more desktop memory than Forms 6 to perform reasonably.

Practical Solution:
Upgrade the Java JRE to version 1.0.0_05 or later. Moreover, allocate at least 512 MB of
memory, using the Java Control
Panel, and add the parameter:
–mx512m –Dcache.size=500000000.

Determine if Oracle Forms communication should be configured in “socket mode”

Issue 1: Determine if Oracle Forms communication should be configured in “socket mode”

In R12 the communication between the Forms java client and the Forms 10g server is by default configured in servlet mode. While this is the recommended deployment model for web forms, servlet mode is more bandwidth intensive and has a higher resource footprint on the JVMs.

Scripts recorded in servlet-mode are quite different than socket-mode. Failure to configure socket-level before script development will result in substantial script development rework. Socket mode allows desktop clients to access the Forms Server directly, by-passing the Apache web server. The key advantage of servlet mode is better load balancing across multiple app servers.

Three examples of script differences:

Statement in “servlet” mode             Equivalent statement in “socket” mode
web_url("frmservlet",… None;            this statement is no longer present
web_url("lservlet;jsessionid=… None;    this statement is no longer present
nca_connect_server("{url}", "9097",…    nca_connect_server("{url}", "8007",…
                                        <note different port number>

Practical Solution:
Have your Oracle Systems Administrator assess your customer’s needs and point him to Oracle Metalink Document ID 384241.1. If appropriate for this installation, have the system reconfigured in socket-mode before any serious script development.