I was trying JDBC query execution through JMeter. I was getting the error like java.sql.SQLException: No suitable driver found . I have given ojdbc6.jar on classpath and installed Oracle client. Still JMeter has thrown error. The solution is, ojdbc6.jar should be copied under JMeter Lib folder (<JMeter installation directory>\lib).
Later, the same script was copied into a server and executed the script. Got the same error. Server does not have Oracle client installation and ojdbc6.jar in JMeter lib folder. Just copied the ojdbc6.jar and able to run the script successfully.
Note:
ojdbc6.jar should be used for Oracle 11 version. Also it is supported only Java1.5 and above.
Saturday, November 26, 2011
JMeter - JDBC Driver issue
Sunday, October 2, 2011
FOR loops & IF condition in RobotFramework
Using Robot Framework, test engineer can create FOR loops and IF conditions. I don't think so, any other Keyword driven framework is giving this kind of flexibility.
FOR loop can be set in two ways. First one is based on number of items in a List. Another one is based on range like from 1 to 50. Similarly keywords can be executed if condition matches or not. See below example.
FOR Loop & IF condition explantation using Robot Framework
| TestCase | Action | Arguments | ||
|---|---|---|---|---|
| VerifyListItems | [Arguments] | ${Locator} | @{ListItems} | |
| [Documentation] | Verifies the list of items present in a List Object. | |||
| : FOR | ${Element} | IN | @{ListItems} | |
| Select From List | ${Locator} | ${Element} | ||
| List Selection Should Be | ${Locator} | ${Element} | ||
| : FOR | ${index} | IN RANGE | 50 | |
| ${obj1}= | Evaluate | ${index}*4+3 | ||
| Run Keyword if | '@{tDriverData}[4]'=='2' | Go To MyProfile | ||
| Run Keyword Unless | '@{tDriverData}[4]'=='2' | Go To UserCreation | ||
Monday, August 15, 2011
Robotframework Installation
RobotFramework Installation is a tricky task. We need to install 6-7 utilities. All should be installed in the same order. Here I have given the instructions for Windows OS.
Tools installation
All RobotFramework related software can be the latest. The other software should be as the same version.
- Install Python (python-2.6.4.msi). Set installation directory as C:\Python26
- Install Robot Framework (robotframework-2.6win32.exe)
- Install Robot Selenium Library (robotframework-seleniumlibrary-2.7.win32.exe)
- Install Python Widgets (wxPython2.8-win32-unicode-2.8.11.0-py26.exe)
- Install Robot IDE (robotide-0.31.win32.exe)
- Install Python Win32 module (pywin32-214.win32-py2.6.exe)
- OPTIONAL (For SeleniumLibrary)- Install Java (jdk-6u14-windows-i586.exe), if your machine does not have Java.
- OPTIONAL (For SeleniumLibrary)- Extract Selenium RC Server (selenium-remote-control-1.0.3.zip)
Environment variables Configuration
To execute RIDE and Pybot, environment variables should set properly.
- Create a system level environment variable & value as --> PYTHONHOME=C:\Python26
- Create a system level environment variable & value as --> PYTHONPATH=C:\Python26\Lib;C:\Python26\Scripts;C:\Python26\Lib\site-packages;C:\Python26\Lib\site-packages\SeleniumLibrary;C:\Python26\Lib\site-packages\robotide\;C:\Python26\Lib\site-packages\robot\;C:\Python26\Lib\site-packages\wx-2.8-msw-unicode;
- Also add to PATH variable --> % PYTHONHOME%;% PYTHONHOME%\Scripts;
Steps for 64 Bit OS
To enable Robot Framework for 64 bit OS, you should install 64 bit python setup in same directory. Also the command prompt should be invoked through setting ‘Run as a Administrator’ if OS is Vista or Windows 7 version.
Verify the Installation
Open new command prompt and type ‘pybot --version’ and output like --> Robot Framework 2.6.0 (Python 2.6.4 on win32).
Tuesday, July 19, 2011
Virtualized Servers for Performance Testing
We have to do benchmark testing as well as stress testing. Already high performance system was purchased and virtual machines are created for performance testing setup. I can see few limitations for this approach, since production boxes all are in physical servers. Earlier I've used virtual machines for automation regression execution.
Issues/Limitations of Virtualized Servers
- if (production environment != load test environment) then result could be wrong
- Increasing the risk of deployment failure
Did a google search and found following links, which give all the details, including Vmware claims.
Virtualization: Performance testing
Measuring the Performance Impact of Virtualizing a Web Application Server
Response to 'Load Testing a Virtual Web Application'
Virtualization performance testing tips
Anybody have experienced load testing on Virtualized servers? Please share your experience...
Tuesday, July 12, 2011
RobotFramework - Overview
I have executed many automation projects and also developed various automation frameworks using different tools like Silktest, QTP, Selenium, CodedUI, MS UIA, VisualTest (dead) and Winrunner (dead). Tried few open source frameworks and found RobotFramework as the best one. Successfully completed five projects using RobotFramework. Main advantage is, I'm able to integrate with different test tools and libraries. It is neither related to IBM Rational tools or any other commercial tools.
Summary in RobotFramework Homepage
Robot Framework is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD). It has easy-to-use tabular test data syntax and utilizes the keyword-driven testing approach. Its testing capabilities can be extended by test libraries implemented either with Python or Java, and users can create new keywords from existing ones using the same syntax that is used for creating test cases.
Robot Framework is open source software released under Apache License 2.0. Its copyrights are owned and development supported by Nokia Siemens Networks.
Robot Framework Features
- Advanced Keyword Driven framework
- Enable functional team contribution for automation
- Reusable/custom keywords
- Dynamic variables
- Easily extendable by Python, C# & Java
- Supports few test libraries including Selenium
- Provides simple and powerful Results Reporting
- Multiple Operating Systems support
- $ Free
Links for Robot Framework Resources
Robot Framework Home Page
Robot Framework User Guide
Robot Framework Quick Start Guide
Robot IDE
Robot Selenium Library
Robot Framework - Introduction
Robot Framework - Articles
Simple tutorial for Robot Framework
In last 6 months, many updates are happened on Robot framework and its related libraries. It is supporting many of my generic automation framework features.
Headers | Features | Robot Framework |
| Supported Frameworks | Functional Decomposition | Yes |
| Data Driven | Yes | |
| Keyword Driven | Yes | |
| Table Driven | Yes | |
| Independent to | Operating System | Yes |
| Application | Yes | |
| Technology | Yes | |
| Test Scripting | Recording | No |
| Parametrization | Yes | |
| Suite Setup Module | Yes | |
| Suite TearDown Module | Yes | |
| Test Setup Module | Yes | |
| Test TearDown Module | Yes | |
| Database Integration | Yes | |
| Scripting | Yes | |
| Environment Library | Yes | |
| Test Execution | Multiple OS | Yes |
| Multiple platforms | Yes | |
| Parallel Execution | No | |
| Test Timeout | Yes | |
| Based on Priority | Yes | |
| Grouping Tests | Yes | |
| Running Failed tests | Yes | |
| Result Analysis | Detail reporting for each step execution | Yes |
| Snapshots for failed tests | Yes | |
| Test level reporting | Yes | |
| Compiled report | Yes | |
| Results by category | Yes | |
| Expected Benefits | Less effort to automate | Yes |
| Less dependence on highly skilled automation professionals | Yes | |
| Exception handling | Yes | |
| Easy to Maintain | Yes | |
| Easy to Integrate with Other tools | Yes | |
| Support to CI (Continuous Integration) tools | Yes | |
| Additional Expectations | Dynamic conditions | Yes |
| Dynamic Loop support | Yes | |
| UI to Edit data | Yes | |
| UI to execute tests | Yes | |
| Update test metrics automatically | Yes | |
| Update captured defects automatically | Yes |
Sunday, July 10, 2011
JMeter Tip - javascript eval
For my jmeter script, I was trying to set a javascript statement for this formula --> pitia=${cpi}+${cti}+(${eshortage}/60)
I used the code like this --> ${__javaScript( eval ('${cpi}'.concat('+'\,'${cti}'\,'+'\,'${eshortage}'\,' /60' ) ) )}
The above one was working in a simple script and it is not worked in my business script.
In jmeter.log, I got the exception like below:
2011/07/07 17:30:30 ERROR - jmeter.functions.JavaScript: Error processing Javascript org.mozilla.javascript.EcmaError: SyntaxError: missing ; before statement (<cmd>#1(eval)#1)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3229)
at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:78)
at org.mozilla.javascript.Parser.addError(Parser.java:126)
at org.mozilla.javascript.Parser.reportError(Parser.java:132)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1175)
at org.mozilla.javascript.Parser.statement(Parser.java:623)
at org.mozilla.javascript.Parser.parse(Parser.java:355)
at org.mozilla.javascript.Parser.parse(Parser.java:293)
The reason for failure is a simple space, which was given for variable 'cpi'. The jmeter error did not indicate the right reason. You should debug each variable.
Tuesday, May 31, 2011
Job Change
Recently joined to AltiSource Portfolio Solutions. will write more about Robot Framework - An Open Source framework
Tuesday, April 26, 2011
What is OWASP
Four years back, I was looking help for security testing and I found OWASP with many presentations, books and testing guides. It helps me lot for my deliverables. OWASP's top 10 is a popular one and reflects the current trend.
OWASP by the numbers (Last year report)
- 420,000 page views per month
- 6,381 Articles
- 15,000 downloads per month
- 21,000 members on mailing lists
- 2,600 wiki users
- 1,500 wiki updates per month
- 160 chapters worldwide
- 75 individual memberships
- 118 tool and documentation projects
- 17 Books
- 43 corporate/educational memberships
- 7 Board members (Jeff, Tom, Dave, Seb. Dinis, Matt, Eoin)
- 39 Committee Volunteers
- 3 Employees (Paulo, Kate, Alison)
- 25 projects funded
OWASP - Open Web Application Security Project
OWASP is a community of people passionate about application security. It is a non-profit(501c3 not-for-profit worldwide charitable organization), volunteer driven organization. All members are volunteers and all work is donated by sponsors. They all share a vision of a world where you can confidently trust the software you use. Unfortunately, the current software market doesn’t encourage security – that’s something they are trying to change. One of primary missions is to make application security visible so that people can make informed decisions about risk.
You can find lots of free and open source tools, documents, basic information, guidelines, presentations, video, and blogs at OWASP to help you get started.
- Worldwide free and open community
- Focused on improving the security of Web applications
- Promotes secure software development
- An open forum for discussion
- Publications, Articles, Standards
- Testing and Training Software
- Local Chapters and Mailing Lists
- Software libraries and tools
OWASP Software - WebGoat - Training application
WebGoat Project
- Cross Site Scripting
- SQL Injection Attacks
- Thread Safety
- Field & Parameter Manipulation
- Session Hijacking and Management
- Weak Authentication Mechanisms
- Many more attacks added
OWASP Software - WebScarab - framework for analyzing HTTP/HTTPS traffic
WebScarab Project
- Fragment Analysis – extract scripts and html as presented to the browser, instead of source code presented by the browser post render
- Proxy – observe traffic between the browser and server, includes the ability to modify data in transit, expose hidden fields, and perform bandwidth manipulation
- BeanShell – the ability to execute Java code on requests and responses before being transmitted between the browser and server; allows runtime extension of WebScarab
- Spider – identifies new URLs within each page viewed
- SessionID Analysis – Collection and analysis of cookies to determine predictability of session tokens
My Previous posts on Security
Security Attacks - OWASP Top 10
Security Testing - Webscarab tool
Security Testing - CSS or XSS
Thursday, March 31, 2011
Security Attacks - OWASP Top 10
I was looking into cross site scripting for security testing. Look at OWASP top 10 attacks for year 2010, 2007, 2004. Few items have gone up or down, added and removed.
Year 2010 - Top 10
- Injection
- Cross-Site Scripting (XSS)
- Broken Authentication and Session Management
- Insecure Direct Object References
- Cross-Site Request Forgery (CSRF)
- Security Misconfiguration
- Insecure Cryptographic Storage
- Failure to Restrict URL Access
- Insufficient Transport Layer Protection
- Unvalidated Redirects and Forwards
Year 2007 - Top 10
- Cross Site Scripting (XSS)
- Injection Flaws
- Malicious File Execution
- Insecure Direct Object Reference
- Cross Site Request Forgery (CSRF)
- Information Leakage and Improper Error Handling
- Broken Authentication and Session Management
- Insecure Cryptographic Storage
- Insecure Communications
- Failure to Restrict URL Access
Year 2004 - Top 10
- Unvalidated Input
- Broken Access Control
- Broken Account and Session Management
- Cross Site Scripting (XSS) Flaws
- Buffer Overflows
- Injection Flaws
- Improper Error Handling
- Insecure Storage
- Denial of Service
- Insecure configuration management
Monday, February 28, 2011
TaskManager - Tiny Footprint mode
Sometimes back, My laptop did not show menu bar and tabs in Task Manager. I restarted the laptop twice and no success. I searched Microsoft knowledge base and got to know about an interesting thing.
Microsoft KB - Task Manager Menu Bar and Tabs Are Not Visible in Windows XP
Problem
This behavior may occur if Task Manager is running in Tiny Footprint mode.
Resolution
To switch Task Manager to its typical display mode, double-click the top border of the window or the empty space in the border.