Monday 9 November 2015

What Is Sonic Bus?

In earlier versions of BAC like 7.5 it was called BUS. Back then, it was Mercury's creation and BUS was based on C. After HP's acquisition, they decided to use an external, third-party product called Sonic BUS - based on java.

What you need to know about bus:

* Sonic bus is the bridge between your BSM Gateway and Data Processing servers

* Data from your Data Collectors (BPM, RUM, SiteScope, Diagnostics, OMW/U etc.) comes to your Gateway server and goes to the Sonic BUS. From there, different components catch the data and use it for their own purpose:

    - db_loader inserts this raw data in your Profile database, so it can be used for reports for example. Based on this data, you get aggregated data. No data from db_loader, no reports.

    - the MARBLE (former online_engine) components of BSM use the Sonic BUS to catch your data and color your views (Dashboard/Service Health).

* Sonic BUS mainly consists of two parts - Message Broker and Domain Manager. MB is located on both Gateway and Data Processing servers, whereas the DM resides only on the Data Processing one. Your data is being transferred between the MB of the two servers.

* Message Broker and Domain Manager work by default on respectively ports 2507 and 2506. Sonic BUS also uses a wide range of dynamic ports.

* Sonic BUS has its own local database (on the BSM file system) - the information that goes to it is not stored in the Database server!

* If you access your BSM servers, go to Start > Programs > Progress, you will find the Sonic BUS management console (press ok to login). From here, you can manage and view the data that is in the Sonic BUS queues.


The Sonic BUS application is a very sensitive one. Always proceed with caution when working with it and avoid any modification, unless you are 100% aware of what you are doing or you are instructed by Support.

Sunday 27 September 2015

How HP Sitescope works!

How HP SiteScope works


HP SiteScope provides a centralized, scalable architecture. HP SiteScope is implemented as a Java server application and runs on a single, central system as a daemon process. The HP SiteScope Java server supports three key functions: data collection, alerting, and reporting. All user interaction is accomplished through a Web-based user interface that enables configuration, installation, administration, real-time status, and reporting from one seamlessly integrated console.

Sitescope Architecture
Sitescope consists of following components:

·         Browser based interface – Manages end user status information requests, configuration changes requests and access control.
·         Scheduler – Coordinates the running of monitors, alerts creation and report generation.
·         Monitors – Collects performance and availability information about the system being monitored.
·         Alerts – Notifications of exceptions, failures and status changes events in the system being monitored.
·         Reports – A historic representation of monitored data for trending and analysis purpose.




Tuesday 16 June 2015

How to capture the URL that is formed because of redirection?

Example:
When visiting http://www.mercury.com, user will be redirected to a different location. How to capture the redirected URL.


Solution:
Use web_reg_save_param()

When that the server redirects a HTTP request to another URL, it normally does that by sending a HTTP 302 Moved header. To verify
1. Run the script in extended log with "data retuned by server' turned on
2. Check the execution log for "302 moved'

You can also see that along with this header, the server also sends the following header information:
   "Location: ."

The URL specified in the "Location' header will be the URL that the original HTTP request be redirected to. To capture this URL, you have to capture the string between "Location:" and "\r\n" (end of line).

Example:

    Action()
    {

       //use the correlation statement to capture the redirection
       web_reg_save_param ("Redirection", "LB=Location: ","RB=\r\n" ,LAST );

       //Visit Mercury homepage
       web_url("Mercury","URL=http://www.mercury.com/", LAST);

       //Print the redirected URL
       lr_message("redirected address = %s", lr_eval_string("{Redirection}"));

       return 0;
    }

Tuesday 5 May 2015

How to Set Proxy Values for all the Ajax TruClient Scripts?

LoadRunner launches Firefox in a temporary profile every time a script is opened for development.

To make the proxy settings available across all these profiles please use the global profile settings do this:

• Open VuGen.
• Open an Ajax TruClient script.
• Go to Tools > Ajax TruClient Browser Options…
• In the dialog that opens (“Ajax TruClient Browser Configuration”), select the Proxy tab and
define the appropriate Proxy settings.
• In the script, open the Run-Time Settings dialog and then select the General > Other Settings
node.
• In the Proxy selection node select the “Use global proxy settings” option. This will make sure
that every time the script is opened for development the proxy settings are refreshed from
the Ajax TruClient Browser Options.

The Run-Time Settings also enable defining specific proxy settings for each script.

How Can I Use JavaScript to Locate Objects in Ajax True client script?

Using the JavaScript identification method you can write JavaScript code that references the returned
document and can use CSS selectors and other standard functions.

For example, the page returned by the server contains multiple links with the same “title” attribute
(search results) and we want the script to randomly click on one of the available links.
Object identification for this case, using the JavaScript identification method, may look something like this:

var my_results = document.querySelectorAll('a[title="SearchResult"]');
my_results[Math.floor(Math.random() * my_results.length)];

Monday 23 March 2015

What is SSL?

Overview of SSL

Secure Sockets Layer (SSL) technology secures communication by
encrypting data and providing authentication. Without SSL encryption,
packets of information travel over networks in full view.
SSL encryption uses two keys:
➤ Public key. The public key is used to encrypt data.
➤ Private key. The private key is used to decipher data.

Both keys together are called a certificate. Every SSL certificate is created for
a particular server in a specific domain by a Certificate Authority (CA).
When an application user or data collector accesses a server, SSL
authenticates the server, and can also be configured to authenticate the
client.

Wednesday 25 February 2015

What is AJAX TrueClient Protocol in Loadrunner

AJAX (Asynchronous JavaScript and XML) is a technique for creating
interactive Web applications. With AJAX, Web pages exchange small packets
of data with the server, instead of reloading an entire page. This reduces the
amount of time that a user needs to wait when requesting data. It also
increases the interactive capabilities and enhances the usability.

AJAX components, also known as AJAX controls, are GUI based controls
that use the AJAX technique - they send a request to the server when a
trigger occurs.

The Ajax TrueClient protocol interactively records scripts on the user level.
This enables VuGen to record dynamic, complex web-based applications
and create user friendly scripts. Scripts are created in real-time and steps can
be seen in the LoadRunner VuGen for TrueClient tab of Mozilla Firefox as
they are performed.

AJAX Supported Frameworks:
The supported frameworks for AJAX functions are:
1) Atlas 1.0.10920.0/ASP.NET AJAX—All controls
2) Scriptaculous 1.8—Autocomplete, Reorder List, and Slider
VuGen supports the following frameworks at the engine level. This implies
that VuGen will create standard Web Click and Script steps, but not AJAX
specific functions:
3) Prototype 1.6
4) Google Web Toolkit (GWT) 1.4

Steps for recording Ajax script:
1) Configure the Run-Time Settings
Configure the Run-Time settings before recording and performing a load
test. To open the Run-Time settings dialog box, click F4.

2) Configure the Global Browser Configuration Settings
The Firefox Browser Configuration settings allow you to configure
settings that apply to all TrueClient scripts. The settings are imported to
new scripts as they are created. To open the Browser Configuration
settings dialog box, click the Edit Browser Options button from the
Record toolbar in the VuGen main window.

3) Start developing the script
Click Develop Script to initialize the interactive recording session in
Mozilla Firefox.

4) Record interactively
Navigate to the desired starting website and click record. All of your
actions will be recorded and displayed in the VuGen tab on the left as you
perform your business process. You can pause or stop the script and
continue recording from any point in the script.
To record into different sections of the script, use the drop down bar
above the toolbars.

5) Enhance the script
You can enhance your script in a number of ways such as inserting
parameters, transaction, loops, and verification steps.

6) Replay the script in Firefox
Replay the script at least two times, correcting any errors that occur
during the process. After two successful consecutive replays, you can
move on to the next step.

7) Stop developing
Click the Save button to save the script. Close the firefox window.

8) Replay the script in Load Mode

TrueClient scripts are run slightly differently when performing load
testing, so Load Mode was created to run the script exactly as it will run
during load testing. In the VuGen main window, click the arrow next to
the Develop Script button to replay the script in Load Mode. Progress can
be monitored in the Interactive Replay log. Firefox does not open, and
snapshot are not displayed.

Tuesday 10 February 2015

How to Resolve Object Identification Issues in Ajax Trueclient Script

In dynamic websites, objects which have been recorded can often move or
change content. This can cause the script to lose the ability to locate the
object. The following steps describe the ways to resolve these issues. When
identifying objects for applications that recorded in windows, make sure
that the correct window is selected using the Window tab.
 - "Highlighting an object"
 - "Improve Object Identification"
 - "Modify the Object Identification Method"
 - "Modify the script timing"
 - "Relating objects to other objects"
 - "Replacing an object"

1) Highlighting an object
Regardless of which method of object identification is used, you can use the
highlight button to check if an object is visible in the application at any
time. If the object cannot be found, an error message is displayed.

2) Improve Object Identification
Use this option first if the object was not found or if multiple objects were
found. Objects are identified using the objects properties. Some of these
properties may be dynamic and thus prevent object identification during
replay. The Improve Object Identification button next to the ID Method
field identifies the object a second time and uses the two definitions to
create a more accurate object definition.

3) Modify the Object Identification Method
You can modify the way TruClient identifies the object by modifying the
object identification method in the Object section of the step properties.
defined The following options are available:

a)Automatic. TruClient’s default object identification method. If this
method does not successfully find the object during replay, click the Improve Object Identification button and replay the script again.
b)XPath. Identifies the object based on an xpath expression that defines
the object in the DOM tree. You can manually modify the expression.
To regenerate the original expression generated by VuGen, click the
Regenerate Expression button.
c)JavaScript. JavaScript code that returns an object. For example:
document.getElementById("SearchButton") returns an element that
has a DOM ID attribute of "SearchButton".

4) Modify the script timing
Sometimes objects may not be found because of timing and
synchronization issues. For example, the script may be looking for an object
that was in the application, but the script replayed too quickly and already
progressed to another page. If you suspect that the object is not being found
because of a timing or synchronization issue, you can insert Wait steps.

5) Relating objects to other objects
If an object becomes difficult to identify on its own, you can label the object
based on a different, more stable object. For example, you can select an
object which is not dynamic and "relate it" to the target object. Relations are
defined visually, relating objects according to their distance in pixels from
other objects. Relations are defined per ID method, per object. If more than
one relation is defined for an ID method of a given object, both relations
must locate the same object for the step to pass. VuGen then uses this object
to help locate the target object. To use this function, expand the step, select
Object > Related Objects, and click the add button. Follow the directions to
create a relation. Verify that it has worked by highlighting both the object
and its related object.

6) Replacing an object
If you selected the wrong object during recording, or an object has
permanently changed you can replace it with a different object without
replacing the step. This effectively resets the step, deleting changes made to
the original step such as relations. Expand the step, select Object, and click
the Replace button. Select the new object and replay the script.

Saturday 7 February 2015

VuGen Parameterization

What is Parameterization

  • Replacing hard coded values in the script is called Parameterization.
  • Parameterization helps in :
    • Reducing script size
    • Avoiding cache effect

Type of Parameters

#1. Date/Time – Whenever we have to replace a date value with a parameter, Date/Time parameter is used. Any post with past date is not valid. To keep it updated, Date/Time parameter provides flexibility to get the current or future date. If past date is needed, it handles that too.
#2. Group Name -We can generate a parameter on the basis of group that we select on controller for the script while execution. This parameter will only work while running the script on controller.
#3. Iteration Number – This replaces the parameter with current iteration number. This is generally used to build some logic. For example- when we want some code in script to be executed alternatively. For this, we will use the iteration number to check whether it is even or odd number and for one of the condition we will execute the function.
#4. Load Generator Name – We can also generate parameter while executing the script on controller on the basis of load generator name on which that script is running. This parameter only works while running the script on controller.
#5. Vuser ID – When we run the script on controller, it assigns a unique id to each virtual user that emulate during the execution. This parameter type is used -
  • To print the Vuser ID in an external file for script-debugging purpose.
  • To segregate transaction volume based on Vuser ID
#6. File – Some time we want to pass the specific value in the script. In such cases, we use file and enter the values that want to use during execution. LR provides options to run the script with provided list sequentially or randomly on next iteration.
In few cases we want to use a set of values passed to the script. In such cases, we can use same file for the other parameter value as well.
#7. Random Number – As per need, Vugen also generates random value from the provided range.
#9. Unique value – In few situations, script is not allowed to pass any duplicate value. In such cases, unique parameter is used  to avoid failures due to duplicate value,.
#10. User Defined function – Such parameter calls a function whose return value replaces the parameter name.
#11. XML – XML Parameter Types are used for multiple valued data contained in an XML structure.  XML parameters are widely used with Web Service scripts and with SOA services.

Friday 6 February 2015

RTE script functions

Below are some RTE script useful function with explanations:

TE_connect
Connects the terminal emulator to the specified host.
TE_find_text
Searches for text in a designated area of the screen.
TE_get_line_attribute
Returns information about text formatting.
TE_get_text_line
Reads text from a designated line on the screen.
TE_get_cursor_pos
Returns the current location of the cursor.
TE_set_cursor_pos
Sets the position of the cursor on the terminal screen.
TE_getvar
Returns the value of an RTE system variable.
TE_setvar
Sets the value of an RTE system variable.
TE_perror
Prints an error code to the LoadRunner output window or Business Process Monitor agent log.
TE_sperror
Translates an error code into a string.
TE_send_text
Sends a null-terminated string to a VT terminal emulator.
TE_type
Sends a formatted string to the client application.
TE_typing_style
Determines the way text is typed into the terminal emulator.
TE_unlock_keyboard
Unlocks the keyboard of a mainframe terminal
TE_wait_cursor
Waits for the cursor to appear at a specified location in the terminal window.
TE_wait_silent
Waits for the client application to be silent for a specified number of seconds.
TE_wait_sync
Waits for the system to return from X-SYSTEM or Input Inhibited mode.
TE_wait_sync_transaction
Records the time that the system remained in the most recent X SYSTEM mode.
TE_wait_text
Waits for a string to appear in a designated location.

Wednesday 4 February 2015

Error No match found for the requested parameter 'ParameterName'

When replaying Web script with a correlation statement, the user receives the following error:

"No match found for the requested parameter 'ParameterName'. If the data you want to save exceeds xx bytes, use web_set_max_html_param_len to increase the parameter size."

Even though the user tries to increase the size for web_set_max_html_param_len, it does not help. What will be a good number for this parameter, and what is the maximum value?

Diagnosis:

When replaying a script with a correlated value, the replay engine will return the above error when there is no match found for the predefined boundaries on the correlation statement. The following information from the error message: If the data you want to save exceeds xx bytes, use web_set_max_html_param_len to increase the parameter size

The above is just a suggestion to try, it may not be a solution. This suggestion should be taken, only if the expected data is over xx bytes.


Solution:

Dealing with web_set_max_html_param_len

1. Find out the size of the data you are trying to retrieve. If it is over 256 bytes, increase this value. Correlation will fail if you try to retrieve a string whose length exceeds the maximum length specify by web_set_max_html_param_len.

Note:
The maximum length for web_set_max_html_param_len is maximum value of unsigned int, which is equal to 4294967295 bytes. If the data you want to save exceed this boundary, you will need to create multiple correlation statements for retrieving the entire dataset.However it is not recommended that such a big value be used and that a value closer to the maximum paramter length expected should be used.

2. If the data you want to save do not exceed the bytes specify in the function, you should focus on finding the correct boundaries or placing the correlation function on the correct place. 

Monday 2 February 2015

Tracking Login Attempts and Logged In Users in HP BSM/BAC

We can always track the user activity in HP BSM/BAC very easily and it is very important too. Follow the below process for doing the same:

There are lots of log file in BSM root folder but below are the stuffs we are concerned here;

See \log\EJBContainer\UserActions.servlets.log.

The appender for this file is located in \conf\core\Tools\log4j\EJB\topaz.properties.

It can also be done by the JMX console as stated below;

To display a list of users currently logged in to the system:
1 Open the JMX console on this machine. For detailed instructions, see
"Using the JMX Console" in the Platform Administration guide.
2 Under the Topaz section, select service=Active Topaz Sessions.
3 Invoke the java.lang.String showActiveSessions() operation.

Wednesday 14 January 2015

Load Runner 12 features

The roadmap for LoadRunner 12 was presented at HP Discover Barcelona in December last year. Since that time, I've been lucky enough to have a beta copy of LR12 for evaluation purposes. Now that the product has been released, I'm able to share some of the new features that I've found to a wider audience.


Key observations / new features are:
Cloud-based load generators. HP describes this feature as "cloud bursting". Users now have the ability to provision load generators on AWS(Amazon Web Service) cloud servers from within LoadRunner or Performance Center. As well as this, the ports used to communicate between LoadRunner components such as Load Generators, Controllers, MI Listeners are user configurable through the new "network security manager" tool. This simplifies the setup process and allows more flexibility in distributed test networks or cloud-based test environments. It is even possible to configure different ports/proxies for each Load Generator.

Licensing - 50 VUsers free

We in the user community have been asking for this for a long time. Providing fully-functional applications that allow small-scale testing allow prolonged evaluations and proof-of-concept exercises. This is great, because it allows more people e.g. developers to get hands-on experience and see the potential benefits of using LoadRunner.

This is likely to improve the adoption rate for LoadRunner and prevent the erosion of market share to low-cost / no-cost providers of performance testing software.

All protocols are included in the "community edition" license, with the exception of GUI (UFT) and COM/DCOM protocols as well as those protocols in the "template" bundle (i.e. those vUser types whose scripts are manually created (rather than record/replay) such as C# .Net, VB .Net vUsers).

VUGEN improvements:
There are a variety of improvements as you would expect. Key ones are:
The ability to review replay statistics for tests after each run.
Including details on total connections, disconnections and bytes downloaded.
The ability to edit common file types in the editor.
Support for recording in the Internet Explorer 11, Chrome v30 and Firefox v23 browsers.
The ability to create scripts from Wireshark or Fiddler files.
The ability to record HTML5 or SPDY protocols.

TruClient improvementsTruClient script converter. This basically replays your TruClient scripts and records the HTTP/HTML traffic allowing you to create these script typers from TruClient recordings. This is similar to recording GUI scripts and then converting to other script types.

The addition of support for Rendezvous points, IP spoofing, VTS2 and Shunra network virtualisation in TruClient scripts.

Linux Load Generator improvements
Building on the increased support for Linux Load Generators in 11.5x, LDAP, DNS, FTP, IMAP, ODBC, POP3, SMTP and Windows Sockets scripts can now be replayed through UNIX load generators.

CI/CD support
Better integration with Jenkins etc.

Platform support
Support for installation on Windows Server 2012.
(LoadRunner 11.x and PC 11.x only supported up to W2K8 which was a barrier to enterprise adoption).
LoadRunner components can now run in a "non-admin" user account with UAC and DEP enabled.

There are numerous other improvements which are well documented in the "About LoadRunner" section in LoadRunner help. Now that the community license is available, there's nothing stopping you from downloading it and giving it a go.

To get your own copy, navigate to www.hp.com/go/loadrunner and follow thre links to download LoadRunner.

Type of Logs in Load Runner Runtime settings

While creating and debugging the script which generated in LoadRunner always create various types of logs which appear in Virtual user generator screen. These logs are very useful when it’s come to debugging your script.

There are four types of log available in LoadRunner:
Recording Log
Generation Log
Replay Log
Co-relations Results



1. Recording Log: This log is generated when user records any script. This log mainly contains client server communication information which is nearly non-readable format. This is not very useful for us since we cannot map many things of this log with our script. This log contains all protocol communication information which used by application on which we are recording.
This Log is useful when we re-generate the script using “Regenerate Script” option of Vugen. Recording log is traces created during the recording Vugen
User cannot re-generate script if this log is not available.


2. Generation Log: The time user stop recording, recording log traces converts into readable format and create a log which is known as “Generation Log”. This log is very useful to see request and response captured by LoadRunner during recording. This log can be refer in script folder by accessing the file “CodeGenerationLog.txt “


3.Replay Log: Now this is the log which helps us a lot while modifying the script. This log generated when user replay the recorded script. In this log we can see what request has been sent to server and which kind response we have received during replay. It’s become very handy when we need to find the problem where script is getting fail during replay. We can increase/decrease the reply log contents by changing the settings in “Run time setting” by selecting standard log or extended log section.


4.Co-relations Results: This log is an interesting log as correlation is very import part of performance testing. This log represents a form of auto correlation. This compares “recording log” and “reply log” and finds dynamic values received any server. We can directly correlate the values from this log. It works like F9 function. Make sure “Data” folder exists in “Script” path.