JMeter Video Tutorial (writing your first JMeter script)
JMeter Video Tutorial (recording a user session with the proxy)
JMeter Best Practices
JMeter Video Tutorial (error checking and dynamic requests)
I Am New to JMeter and JMeter Scripting. Where Do I Begin?
How to Send Control Characters Using the JMeter TCP Sampler
Using JMeter Functions - Part I
Using JMeter Functions - Part II
How to use Access Log Sampler to Generate Traffic with JMeter
How to use JMeter for Login Authentication
JMeter 2.6 Listeners
Join the JMeter Meetup groups!
How to Create a JMeter Script to Check Email During Registration AND Grab the Confirmation URL
The New HTTP Sampler in JMeter 2.6
Using CSV DATA SET CONFIG
Using JDBC Sampler in JMeter 2.6
Using JMeter Module Controller
Using RegEx (Regular Expression Extractor) with JMeter
Using User Defined Variables in JMeter 2.6
Customize jmeter.properties and adding/editing a new/old JMeter property
How to make JMeter behave more like a real browser
Tuesday, October 22, 2013
JMeter Tutorials
DB / MySQL load/Performance/Bench marking Testing using JMeter
JDBC Request Transaction Isolation
If you have already downloaded JMeter 2.6 and read Changes, you have noticed, that it contains some new features related to database performance testing. You can ask me: “This blog is devoted to web-sites load testing, why should we talk about databases?” Ok, you are partially right, but can you imagine modern web-site without database? No, you cannot. Because almost every web-site except static web-pages follows conception of separating design from content. And if you develop highly loaded web-application, you may want to know whether database has bottleneck or not. So, let’s talk about what’s new database testing features has JMeter.
There are 2 changes: new JDBC pre- and post-processors (figure 1 and 2), which are added since this release, and “transaction isolation” that is added to JDBC Connection Configuration element (figure 3)


Figure 1 Figure 2

Figure 3
You see that pre- and post-processors are almost the same. Their appointment is to prepare database for testing and to rollback unnecessary changes after testing is done. So, you can specify any SQL query for them to execute. Another thing – “Transaction Isolation” option. And here I should say a few words about SQL transactions.
Transaction…What does it mean? Database transaction is a cycle of SQL queries that are executed against database to search or modify its content. According to definition, a database transaction must be atomic, consistent, isolated and durable. You may know acronym ACID, which describes these properties. Transactions in databases should be isolated from each other to avoid data corruption. Different databases support different isolation levels. Oracle DB that is one of the most common DB’s has 4 levels of isolation: SERIALIZABLE, REPEATABLE READS, READ COMMITTED, READ UNCOMMITTED. For more details you can refer to Wikipedia - Database Transactions . I will just mention that database performance e.g. how much SQL requests it can process per unit time depends on isolation level of transaction, because when transaction has level SERIALIZABLE(the highest one), no another transactions can work with certain data at the same time. And vice verse, multiple READ_UNCOMMITTED transactions can work with database record simultaneously, but this can cause errors in data if these transactions write some data to DB. There are three types of issues with database transaction:
- Dirty reads (Uncommitted Dependency);
- Non-repeatable reads;
- Phantom reads;
A dirty read happens if a transaction is allowed to read data from a row that has been modified by another running transaction and not yet committed. See example in below.
Transaction 1 Transaction 2
/* Query 1 */ SELECT age FROM users WHERE id = 1; /* will read 20 */ | |
/* Query 2 */UPDATE users SET age = 21 WHERE id = 1;/* No commit here */ | |
/* Query 1 */ SELECT age FROM users WHERE id = 1; /* will read 21 */ | |
ROLLBACK; /* lock-based DIRTY READ */ |
A non-repeatable read occurs, when during the course of a transaction, a row is retrieved twice and the values within the row differ between reads.
Transaction 1 Transaction 2
/* Query 1 */ SELECT * FROM users WHERE id = 1; | |
/* Query 2 */ UPDATE users SET age = 21 WHERE id = 1; COMMIT; /* in multiversion concurrency control, or lock-based READ COMMITTED */ | |
/* Query 1 */ SELECT age FROM users WHERE id = 1; /* will read 21 */ | |
/* Query 1 */ SELECT * FROM users WHERE id = 1; COMMIT; /* lock-based REPEATABLE READ */ |
A phantom read occurs when, in the course of a transaction, two identical queries are executed, and the collection of rows returned by the second query is different from the first.
Transaction 1 Transaction 2
/* Query 1 */ SELECT * FROM usersWHERE age BETWEEN 10 AND 30; | |
/* Query 2 */ INSERT INTO users VALUES ( 3, 'Bob', 27 ); COMMIT; | |
/* Query 1 */ SELECT * FROM users WHERE age BETWEEN 10 AND 30; |
So, it’s very important for developer to choose appropriate isolation level for SQL queries. And that’s why performance testers need to take into consideration this parameter while developing test-plan.
How it was implemented in JMeter 2.5.1? Unfortunately, there was no such option before version 2.6. All JDBC Request had the same, default level of isolation. This issue made almost impossible recreation of real load while testing databases in highly loaded enterprise applications.
The things are changed in JMeter 2.6. Now we can create SQL queries of any configurations. Let’s see, how it works.


Figure 4 Figure 5
For my testing I used local MySQL database that is installed on my desktop
First, I add one JDBC Connection Configuration. I fill “Database connection configuration” section with valid credentials to database and set name “First Transaction” for this connection. Note, that I set “Transaction Isolation” to TRANSACTION_READ_UNCOMMITED that means that another transaction can have read/write access to data, which is used by current transaction. “first” transaction will contain only one JDBC request with the following SQL query: “UPDATE world.city SET population=1000000 WHERE Name like '%'”
Then I create “Second Transaction” JDBC Connection Configuration. The only its difference from first transaction is that I set “TRANSACTION_SERIALIZABLE” as transaction isolation option (figure 6).

Figure 6
“Second Transaction” contains the same JDBC Request.
Both JDBC PostProcessors contain query “Rollback” to revert all changes in database to latest stable state(figure 7).

Figure 7
I’ll set only one user for “JDBC_Users” Thread group (see figure 8).

Figure 8
OK, I press “Start” button. Test is executed and what I see in “View Results in Table” listener (figure 9)?

Figure 9
Despite of the fact that connection 1 was created earlier, second request has less execution time.
It happened because second transaction had SERIALIZABLE level and first only READ_UNCOMMITTED. So 2nd occupied database table until it ended and only after that first request could complete its job.
So, you see that database performance depends on transaction isolation levels. That’s why opportunity of selecting isolation level of JDBC request is important for database performance testing.
Monday, July 22, 2013
API Automation platforms
API automation platforms:
![]() |
Cloudwork - Cloudwork is a service that allows users to automate tasks between Google Apps, Salesforce, Evernote, Zoho, Twitter, Freshbooks, MailChimp, Zendesk, Dropbox, WordPress and others. |
![]() |
Elastic.io - Elastic.io is an API integration and orchestration platform for non programmers, offering a simple tool for users to create and run data/API mashups directly from the browser, to automating simple tasks between API platforms. |
![]() |
FoxWeave - FoxWeave enables enterprises that are building or using Cloud based Services (SaaS, DBaaS etc) to connect those Services to each other and to external Cloud and On-Premise Apps and Databases. |
![]() |
If This Then That (IFTTT) - IFTT is a service that allows anyone to built connections driven from APIs by building channels made up of triggers and actions, bundled into whats IFTT calls recipes, which are triggered every 15 minutes. |
![]() |
MashableLogic - MashableLogic is a mashup development platform that provides a system for leveraging API's by turning them into re-usable components that can be combined to compose software solutions. |
![]() |
Tarpipe - Tarpipe provides a platform for automate tasks, creating workflows between apps to automate low value tasks, generate activity streams from multiple apps in one place, sync data from one app to another as a background task, and publishing of content to multiple API locations. |
![]() |
Wappwolf - Wappwolf is focused on deconstructing the barriers of the Cloud, by connecting your Evernote, Facebook, Flickr, and other web services / apps to Dropbox, allowing users to drag & drop files into a predefined folder on Dropbox and automatically convert and sync to your favorite places. |
![]() |
We-Wired Web - We-Wired Web enables users to define automated tasks using over 50 popular web services using APIs that execute periodically. |
![]() |
Yahoo Pipes - Pipes is a composition tool to aggregate, manipulate, and mashup content from around the web. Like Unix pipes, simple commands can be combined together to create output that meets your needs. |
![]() |
Zapier
- Zapier uses what they call a zap to deliver a combination of a
trigger and an action using APIs, allowing users to drag and drop to
build new zaps and run in background or manually from a dashboard. JBlack a java api test automation tool - http://jblack.sourceforge.net/ |
Tuesday, March 5, 2013
Selenium IDE - How get Current - date, month, year & time through script
Selenium IDE - How get Current - date, month, year & time through script
There are many ways like as below:
1.
Current Time - javascript{(new Date().getHours()+" : " + new Date().getMinutes() + " : " + new Date().getSeconds())}
Current year - javascript{(new Date()).getFullYear()}
Current Month - javascript{(new Date().getMonth()) + 1}
Current date - javascript{(new Date().getDate().toString())}
2.
There are many ways like as below:
1.
Current Time - javascript{(new Date().getHours()+" : " + new Date().getMinutes() + " : " + new Date().getSeconds())}
Current year - javascript{(new Date()).getFullYear()}
Current Month - javascript{(new Date().getMonth()) + 1}
Current date - javascript{(new Date().getDate().toString())}
2.
<tr>
<td>storeEval</td>
<td>var d=new Date(); d.getDate()+'-'+((d.getMonth()+1))
+'-'+d.getFullYear();</td>
<td>date2</td>
</tr>
<tr>
<td>echo</td>
<td>${date2}</td>
<td></td>
</tr>
3.
Saturday, March 2, 2013
More about Prototyping methodology ....
Prototyping Model
The prototyping model assumes that you do not have clear requirements at the beginning of the project. Often, customers have a vague idea of the requirements in the form of objectives that they want the system to address. With the prototyping model, you build a simplified version of the system and seek feedback from the parties who have a stake in the project. The next iteration incorporates the feedback and improves on the requirements specification. The prototypes that are built during the iterations can be any of the following:- A simple user interface without any actual data processing logic
- A few subsystems with functionality that is partially or completely implemented
- Existing components that demonstrate the functionality that will be incorporated into the system
- Capture requirements. This step involves collecting the requirements over a period of time as they become available.
- Design the system. After capturing the requirements, a new design is made or an existing one is modified to address the new requirements.
- Create or modify the prototype. A prototype is created or an existing prototype is modified based on the design from the previous step.
- Assess based on feedback. The prototype is sent to the stakeholders for review. Based on their feedback, an impact analysis is conducted for the requirements, the design, and the prototype. The role of testing at this step is to ensure that customer feedback is incorporated in the next version of the prototype.
- Refine the prototype. The prototype is refined based on the impact analysis conducted in the previous step.
- Implement the system. After the requirements are understood, the system is rewritten either from scratch or by reusing the prototypes. The testing effort consists of the following:
- Ensuring that the system meets the refined requirements
- Code review
- Unit testing
- System testing
The main disadvantage of the prototyping model is that it can lead to poorly designed systems. The prototypes are usually built without regard to how they might be used later, so attempts to reuse them may result in inefficient systems. This model emphasizes refining the requirements based on customer feedback, rather than ensuring a better product through quick change based on test feedback.
More about Agile Methodology
Agile Methodology
Most software development life cycle methodologies are either iterative or follow a sequential model (as the waterfall model does). As software development becomes more complex, these models cannot efficiently adapt to the continuous and numerous changes that occur. Agile methodology was developed to respond to changes quickly and smoothly. Although the iterative methodologies tend to remove the disadvantage of sequential models, they still are based on the traditional waterfall approach. Agile methodology is a collection of values, principles, and practices that incorporates iterative development, test, and feedback into a new style of development. For an overview of agile methodology, see the Agile Modeling site at http://www.agilemodeling.com/.The key differences between agile and traditional methodologies are as follows:
- Development is incremental rather than sequential. Software is developed in incremental, rapid cycles. This results in small, incremental releases, with each release building on previous functionality. Each release is thoroughly tested, which ensures that all issues are addressed in the next iteration.
- People and interactions are emphasized, rather than processes and tools. Customers, developers, and testers constantly interact with each other. This interaction ensures that the tester is aware of the requirements for the features being developed during a particular iteration and can easily identify any discrepancy between the system and the requirements.
- Working software is the priority rather than detailed documentation. Agile methodologies rely on face-to-face communication and collaboration, with people working in pairs. Because of the extensive communication with customers and among team members, the project does not need a comprehensive requirements document.
- Customer collaboration is used, rather than contract negotiation. All agile projects include customers as a part of the team. When developers have questions about a requirement, they immediately get clarification from customers.
- Responding to change is emphasized, rather than extensive planning. Extreme Programming does not preclude planning your project. However, it suggests changing the plan to accommodate any changes in assumptions for the plan, rather than stubbornly trying to follow the original plan.
More about Extreme Testing or Test Driven Methodology
Extreme Programming
In Extreme Programming, rather than designing whole of the system at the start of the project, the preliminary design work is reduced to solving the simple tasks that have already been identified.The developers communicate directly with customers and other developers to understand the initial requirements. They start with a very simple task and then get feedback by testing their software as soon as it is developed. The system is delivered to the customers as soon as possible, and the requirements are refined or added based on customer feedback. In this way, requirements evolve over a period of time, and developers are able to respond quickly to changes.
The real design effort occurs when the developers write the code to fulfill the specific engineering task. The engineering task is a part of a greater user story (which is similar to a use case). The user story concerns itself with how the overall system solves a particular problem. It represents a part of the functionality of the overall system. A group of user stories is capable of describing the system as a whole. The developers refactor the previous code iteration to establish the design needed to implement the functionality.
During the Extreme Programming development life cycle, developers usually work in pairs. One developer writes the code for a particular feature, and the second developer reviews the code to ensure that it uses simple solutions and adheres to best design principles and coding practices.
Discussion of the core practices of Extreme Programming is beyond the scope of this chapter. For more information, see the links referred to in "More Information" later in this section.
Test-driven development, which is one of the core practices in Extreme Programming, is discussed in greater detail later in this chapter.
When to Use Extreme Programming
Extreme Programming is useful in the following situations:- When the customer does not have a clear understanding of the details of the new system. The developers interact continuously with the customer, delivering small pieces of the application to the customer for feedback, and taking corrective action as necessary.
- When the technology used to develop the system is new compared to other technologies. Frequent test cycles in Extreme Programming mitigate the risk of incompatibility with other existing systems.
- When you can afford to create automated unit and functional tests. In some situations, you may need to change the system design so that each module can be tested in isolation using automated unit tests.
- When the team size is not very large (usually 2 to 12 people). Extreme Programming is successful in part because it requires close team interaction and working in pairs. A large team would have difficulty in communicating efficiently at a fast pace. However, large teams have used Extreme Programming successfully.
More Information
For more information about the core practices in Extreme Programming, see the following resources:- "What Is Extreme Programming?" at http://xprogramming.com/xpmag/whatisxp
- "Extreme Programming: A Gentle Introduction" at http://www.extremeprogramming.org/
Friday, March 1, 2013
Selenium IDE - Find & Replace text in url
Selenium IDE - Find & Replace text in url
Steps:
1. First store current url in to any variable.
<tr>
<td>storeLocation</td>
<td>url1</td>
<td></td>
</tr>
2. Next using replace function, replace the word - pdfreader with epub reader in the url & again store in different variable.
<tr>
<td>storeEval</td>
<td>"${url1}".replace("pdfreader","epubreader")</td>
<td>url2</td>
</tr>
Steps:
1. First store current url in to any variable.
<tr>
<td>storeLocation</td>
<td>url1</td>
<td></td>
</tr>
2. Next using replace function, replace the word - pdfreader with epub reader in the url & again store in different variable.
<tr>
<td>storeEval</td>
<td>"${url1}".replace("pdfreader","epubreader")</td>
<td>url2</td>
</tr>
Tuesday, January 15, 2013
Selenium Automation Frameworks
1
|
Selenium
+ Ant + Test NG
|
|
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
7
|
||
8
|
||
9
|
||
10
|
Selenium RC, Eclipse, Java - Hrmes framework
The HRMES is a test framework built for ALL testers of web based applications.
Supports Selenium RC, IDE, Grid etc., - >> More
Supports Selenium RC, IDE, Grid etc., - >> More
One Good framework from Open2 site - >> More
Selenium Integration Testing For All Framework - >> Video Clip
Testing Testlink via Selenium RC - >> Video Clip
ROBOT Framework - Selenium RC & Java - >> Download from here >> One more >> another one
Selenium Integration Testing For All Framework - >> Video Clip
Testing Testlink via Selenium RC - >> Video Clip
ROBOT Framework - Selenium RC & Java - >> Download from here >> One more >> another one
Selenium & PHPUnit
Best Article ( step-by-step) to know the setup Selenium RC + PHPUnit - click here
Best to learn & automate using Selenium with PHPUnit - click here &
Best Article ( step-by-step) to know the setup Selenium RC + PHPUnit - click here
Best to learn & automate using Selenium with PHPUnit - click here &
- to download - www.phpunit.de
Integrating & Testing PHPUnit with Selenium - sebastian-bergmann.de
How to use Selenium - PHPUnit for automating functional tests - drupal
Selenium RC integration for PHPUnit - sebastian's github
Testing PHP/Web Applications with PHPUnit and Selenium - sebastian bergmann Video Clip
Pear site to download all the packages - click here
Selenium Framework for PHPUnit - Mediawiki
Article on how to run phpunit with selenium RC - Devzone Article
Drunit - PHPUnit and Selenium RC integration for Drupal - Drunit
Exlusive Video clip for phpUnit y Selenium RC - >> Video clip
Article to how to install - PHPUnit, Testing_Selenium in Windows Vista - Click here ...
Selenium Framework for PHPUnit - Mediawiki
Article on how to run phpunit with selenium RC - Devzone Article
Drunit - PHPUnit and Selenium RC integration for Drupal - Drunit
Exlusive Video clip for phpUnit y Selenium RC - >> Video clip
Article to how to install - PHPUnit, Testing_Selenium in Windows Vista - Click here ...
Blog from saucelab to integrate PHPUnit with Selenium - click here
Yii framework - click here
Useful article with screenshots - click here
Selenium RC & PHPUnit & Ant
Selenium RC & PHPUnit & Ant
How to integrate with ant script -- click here
Selenium & JUnit
A standard framework - Click here ...
Selenium RC with JUnit: - Click here ...
Selenium with JUnit & JMeter
Selenium Grid with PHPUnit
Integration of Selenium Grid with PHPUnit - video clip
Google code based frameworks
Subscribe to:
Posts (Atom)