Wednesday, February 17, 2016

WSO2 Identity server Test automation

This article describes and provides insights into creating Dynamic input based fully Automated test for user scenario testing for - WSO2 identity server authentication (involving authorization mechanisms like SAML2, OAUTH, JWT token)

Some common steps which can be 100% automated are as follows:

- A request for SAML2 authentication request. redirecting the user, using the returned URI, towards the Identity server.

- The returned value is an URI. It is expected from the web application to redirect the user towards the returned URI.

Re-direct based authentication using SAML2, SAML2 authentication request,JWT token verification - real time accessing of JWT token, API key.WSO2 Identity Server.

- user redirected the login-page of the Identity Server. 

- The API Engine receives the authentication response on a callback endpoint. After parsing and validation of the response. 
- API Gateway generated JWT token [complying RFC7519 and uses HMAC-256 digest and signature algorithm.] .
--  the JWT tokenis provided back to the Web application.
checking the JWT token from browser:Resources -->session Storage.

This is what you need to automate in real time each time the test executes.

JWT token can be decoded using the jwt.io for checking credentials.


Redirected command can also be retieved the same way in real time.
so each time a new jwt token is generated it is captured and pushed in with new call in the test script.


same way in callback saml response can be retieved and further channeled into calls.



Monday, November 23, 2015

How to disable internet explorer enhanced security configuration on windows 2008 R2


{if you are getting a lot of problem with pop pus from IE and you cannot install java from hard disk/ or access any site this might help}


  1. Go to Control panel
  2. click at Server manager
  3.  In there click at IE enhance security configuration, and now set it to OFF. see screenshot below!



Monday, May 5, 2014

Creating Free Test Replica Machine. Costs : 0 $


Converting a Local machine or a virtual machine into Portable Virtual Machine which can be runned on VMware Player.
Create Portable Virtual machine for VMware Player.

1. Converting VM Virtual machine into a Virtual machine for VMware Player.
2. Selected not all the Drive. Just c: is selected while conversion to get only software’s installed.
3. Because the Space on the VM was not enough for itself. So I mapped the local drive to this VM and the converted disk will be saved on Local drive Z:\ in RA folder







TroubleShooting:  
When after Converting a windows XP/win 7 machine you start the machine in VMware Player and it shows the Blue screen and reboots again. This problem can be fixed by selecting:

When you start converting the standalone machine ,
In third step : OPTIONS : select Devices and in Disk Controller: SCSI Bus Logic. And go further and let it make the machine.
Note: I was making the conversion  for Vmware Player version 4.0.X so you need to select the specific version in previous step.


Machine is created and process is complete.




Machine is made and completed.. ready to be used in VMWARE Player.



Running 2 different VM’s on Local system and all connected.
VM1: windows XP running in VMware player.
VM2: Windows 2008 server R2 running in VMware player.
my web browser is pointing to VM1 and my browser is running on Local machine-Laptop.
I configured & connected using:
In the VPC image in VMware player and set both to use HOST only.
Doing this the VMs will recognize each other and also the HOST but they will not see outside of my machine.
So no impact from outside world, tests will be executed in protected environment.

 Note : If you choose NAT then the VMs can access outside your HOST (machine running the VMs) if your HOST has internet/network access.







Tuesday, April 29, 2014

Adapting Automatic Selenium test scripts to use Internet Explorer (IE) and Firefox

for Executing the Automated C# scripts for my tests I used the following code:

To RUN the same test in Internet explorer, a small change will be sufficient to execute similarly.see following code replacement :


To run the test for a different browser, simply supply the name of the browser as the second argument. For example, *iexploreuses Internet Explorer as the browser instead of Firefox. Use *opera for the Opera browser or *safari for Apple Safari.
Note that the browser must be supported on the operating system on which you are running the tests. You will get exceptions and, therefore, failed tests if you attempt to execute tests for a browser that doesn't exist on your operating system, such as*safari or *iexplore on a system running Linux®.

Enable Selenium Commands in Firefox

In some applications, the javascript replaces or disables the context menu's.
As a result of this the Commands of selenium do not work and you get test errors.
Simple way to fix this is simply unselecting the "Disable or replace context menus" checkbox and reload the page.
this is the easiest and fastest way to get things working.

Supporting two Gui's for QTP11.00 tests - Qualitycentre 10.00

setting the environmnet variable on the QTP machine to support two types of GUI's
thus the same machine can then be used for both the nighty builds. only in the qtp init function i added the code where it is checked what gui type is it. for both specific tests a specific gui tpe: new or old is set using the environment variables file in qtp and then with help of windows env variable this value is compared and overwritten for test executions.








Sunday, February 23, 2014

JMETER HEAP adjustment

When you are unable to add largeer messages in JMETER, and you get the following error:



then you need to increase the standard setting of HEAP  in jmeter.bat

FROM:   set HEAP=-Xms512m -Xmx512m
TO : set HEAP=-Xms512m -Xmx1024m


For example: if you want to set the maximum heap size to 4 gigabytes, you’ll need to change the line to: HEAP="-Xms512m -Xmx4096m"

another efficient way to execute script is:
You can execute JMeter test from the command line. It is as simple as

jmeter -n -t Rahulstest script_number202.jmx

Json extractor and While loop

Waiting for a specific value in response of api request. using while loop. Add a While Loop. The api requets will be executed inside th...