QA Tech Notes
Monday, December 31, 2012
Tuesday, December 25, 2012
New Blog
Hi all ,
Now you can download A/L ICT papers and Notes from my new blog.
please go to
Now you can download A/L ICT papers and Notes from my new blog.
please go to
A/L ICT Notes and Papers
Sunday, July 3, 2011
A/L ICT Model Paper 01
I have uploaded a 1st model paper of A/L ICT which is created by me. If you like to do that download it and do it.
If you need to correct the answers please send me the answers.
my Gmail address is jtk.jeewantha@gmail.com .
Download Here
Hope this will help you.
I will post some lecture notes related to the A/L ICT in future.
If you can tell me what area you need mostly i will prepare them and share with you. just put a comment to this post by saying the area you need.
To download more papers and notes click here
If you need to correct the answers please send me the answers.
my Gmail address is jtk.jeewantha@gmail.com .
Download Here
Hope this will help you.
I will post some lecture notes related to the A/L ICT in future.
If you can tell me what area you need mostly i will prepare them and share with you. just put a comment to this post by saying the area you need.
To download more papers and notes click here
Thursday, October 29, 2009
Cucumber and Ruby on Rails (Part 7) My learning materials
Now lets see a scenario to go through the links and how the cucumber deals with that scenario.
Before write the scenario lets look at the scree shots and what could be the scenario.
1 Step:- I am on the “List of products” page and I can see
Titled = Ruby on Rails
Description = Model View Architecture
Image url = ror.jpg
Price = 22
2 Step:- Now I click on “New Product” link.
3 Step:- Now click on “Back” link again. Then I am again on “List of Products”.
4 Step:- Now click on “Show” link and then I can see
5 Step: like wise we can navigate through the links
Now lets see how this scenario can be written. Before that look at these step definitions. You can find them in webrat_steps.rb file.
When /^I press "([^\"]*)"$/ do |button|
click_button(button)
end
This can be used for when we click on button
When /^I follow "([^\"]*)"$/ do |link|
click_link(link)
end
When /^I follow "([^\"]*)" within "([^\"]*)"$/ do |link, parent|
click_link_within(parent, link)
end
These two can be used when we navigate through the links.
Now lets see the scenario.
Scenario: Go Through Links
Given I have products titled Ruby on Rails, description Model View Architecture, Image url ror.jpg, Price 22
When I go to the list of Products
Then I should see "Ruby on Rails"
And I should see "Model View Architecture"
And I should see "ror.jpg"
And I should see "22"
When I follow "New Product"
And I follow "Back"
And I am on the list of Products
Then I should see "Ruby on Rails"
And I should see "Model View Architecture"
And I should see "ror.jpg"
And I should see "22"
When I follow "Show"
Then I should see "Ruby on Rails"
And I should see "Model View Architecture"
And I should see "ror.jpg"
And I should see "22"
When I follow "Back"
And I am on the list of Products
Then I should see "Ruby on Rails"
And I should see "Model View Architecture"
And I should see "ror.jpg"
And I should see "22"
When I follow "Edit"
And I follow "Back"
And I am on the list of Products
Then I should see "Java"
And I should see "Platform Independent"
And I should see "java.jpg"
And I should see "20"
save this scenario as go_through_links.feature and run the cucumber features/go_through_links.feature
Then you can see the following screen shot.
Why this scenario failed. Look at these steps.
When I follow "Edit"
And I follow "Back"
And I am on the list of Products
Then I should see "Java"
And I should see "Platform Independent"
And I should see "java.jpg"
And I should see "20"
These steps are wrong. They should be as follows.
When I follow "Edit"
And I follow "Back"
And I am on the list of Products
Then I should see "Ruby on Rails"
And I should see "Model View Architecture"
And I should see "ror.jpg"
And I should see "22"
Edit the feature file and run again cucumber features/go_through_links.feature. Now you can get the all the steps are passed massage.
This is how the cucumber work with the navigation scenario.
Before write the scenario lets look at the scree shots and what could be the scenario.
1 Step:- I am on the “List of products” page and I can see
Titled = Ruby on Rails
Description = Model View Architecture
Image url = ror.jpg
Price = 22
2 Step:- Now I click on “New Product” link.
3 Step:- Now click on “Back” link again. Then I am again on “List of Products”.
4 Step:- Now click on “Show” link and then I can see
5 Step: like wise we can navigate through the links
Now lets see how this scenario can be written. Before that look at these step definitions. You can find them in webrat_steps.rb file.
When /^I press "([^\"]*)"$/ do |button|
click_button(button)
end
This can be used for when we click on button
When /^I follow "([^\"]*)"$/ do |link|
click_link(link)
end
When /^I follow "([^\"]*)" within "([^\"]*)"$/ do |link, parent|
click_link_within(parent, link)
end
These two can be used when we navigate through the links.
Now lets see the scenario.
Scenario: Go Through Links
Given I have products titled Ruby on Rails, description Model View Architecture, Image url ror.jpg, Price 22
When I go to the list of Products
Then I should see "Ruby on Rails"
And I should see "Model View Architecture"
And I should see "ror.jpg"
And I should see "22"
When I follow "New Product"
And I follow "Back"
And I am on the list of Products
Then I should see "Ruby on Rails"
And I should see "Model View Architecture"
And I should see "ror.jpg"
And I should see "22"
When I follow "Show"
Then I should see "Ruby on Rails"
And I should see "Model View Architecture"
And I should see "ror.jpg"
And I should see "22"
When I follow "Back"
And I am on the list of Products
Then I should see "Ruby on Rails"
And I should see "Model View Architecture"
And I should see "ror.jpg"
And I should see "22"
When I follow "Edit"
And I follow "Back"
And I am on the list of Products
Then I should see "Java"
And I should see "Platform Independent"
And I should see "java.jpg"
And I should see "20"
save this scenario as go_through_links.feature and run the cucumber features/go_through_links.feature
Then you can see the following screen shot.
Why this scenario failed. Look at these steps.
When I follow "Edit"
And I follow "Back"
And I am on the list of Products
Then I should see "Java"
And I should see "Platform Independent"
And I should see "java.jpg"
And I should see "20"
These steps are wrong. They should be as follows.
When I follow "Edit"
And I follow "Back"
And I am on the list of Products
Then I should see "Ruby on Rails"
And I should see "Model View Architecture"
And I should see "ror.jpg"
And I should see "22"
Edit the feature file and run again cucumber features/go_through_links.feature. Now you can get the all the steps are passed massage.
This is how the cucumber work with the navigation scenario.
Friday, October 23, 2009
Software Test Tools
What Are Software Test Tools?
Software test tools help development teams investigate software bugs, verify functionality, and ensure both the reliability and security of the software they develop. Tools are available for all stages of a software development project. Some software testing tool vendors offer an integrated suite that will support testing and development throughout the life of a project, from gathering requirements to supporting the live system. Other vendors concentrate on a single part of the application development life cycle.
Software Test Tools Business Drivers and Benefits
1) Increase the quality of software applications.
2) Software performance measurement.
3) Improving process management lifecycle of the product.
4) Perform a risk analysis and benchmarking.
5) Gain consistency in testing procedures with automated testing tools (as opposed to manual testing, which may be incompatible).
6) Improving the time to put on the market following the effective detection of functional performance, and security issues.
7) Save money on software development and maintenance costs
Software Test Tools Risks
1. Automated testing can produce quantities of raw data cumbersome. Test for choosing one form tool you can easily manipulate the data that is capable of change and should work together.
2. It undermines the efficiency of fault injection is not important. Fault injection tool specific code paths above weaknesses, particularly, the path that are victims of security attacks can not show through the check.
3. There are two drawbacks you enough for choosing the wrong software tools have not only wasted time and resources, but also an obstacle that you can get your teams made solutions difficult.
Software test tools help development teams investigate software bugs, verify functionality, and ensure both the reliability and security of the software they develop. Tools are available for all stages of a software development project. Some software testing tool vendors offer an integrated suite that will support testing and development throughout the life of a project, from gathering requirements to supporting the live system. Other vendors concentrate on a single part of the application development life cycle.
Software Test Tools Business Drivers and Benefits
1) Increase the quality of software applications.
2) Software performance measurement.
3) Improving process management lifecycle of the product.
4) Perform a risk analysis and benchmarking.
5) Gain consistency in testing procedures with automated testing tools (as opposed to manual testing, which may be incompatible).
6) Improving the time to put on the market following the effective detection of functional performance, and security issues.
7) Save money on software development and maintenance costs
Software Test Tools Risks
1. Automated testing can produce quantities of raw data cumbersome. Test for choosing one form tool you can easily manipulate the data that is capable of change and should work together.
2. It undermines the efficiency of fault injection is not important. Fault injection tool specific code paths above weaknesses, particularly, the path that are victims of security attacks can not show through the check.
3. There are two drawbacks you enough for choosing the wrong software tools have not only wasted time and resources, but also an obstacle that you can get your teams made solutions difficult.
Monday, October 19, 2009
Test Automation
Test automation is the use of software for monitoring the performance tests, comparing actual results with expected results, the functions of setting up test conditions and control tests and other testing Reference [1]. Generally, test automation involves automating a manual process already in place that uses a formalized testing process.
Following two pictures are describing the test automation steps.
Following two pictures are describing the test automation steps.
Cucumber and Ruby on Rails (Part 6) My learning materials
OK now I think you all have good knowledge about my pasts posts. I f you have any question you can ask me any time by mailing me. Now lets move to our todays lesson.
What can we do further with our project. Hmmmmm... We can validate user inputs . Lets see how can the validations can be done using cucumber.
What can we validate. We can validate “user inputs are OK such as is price is a numerical value or not and all the fields are not empty etc..”
Before doing the cucumber part lets see the what is happening in GUI part.
Go to the product/app/models/ folder and open product.rb file. Afetr that copy and paste following codes to it as follows.
class Product < ActiveRecord::Base
validates_presence_of :title, :description, :image_url
validates_numericality_of :price
end
Now lets see the GUI.
1)First go to the product folder in the terminal and then run the server “ruby script/server”
2) Then gotothe browser and type “http://localhost:3000/products” . Then you can see following GUI
3)click on New product link and you can see this page.
4)Now check what is happening when click on create button without filling any field. You can see following error massages.
5)Now you can see what is happening when there is one field is filling and click create button. Check them with your self.
6)Now lets see how the cucumber can use for this.
7)Go to the feature folder and create a new file called validate_product_details.feature and copy and paste following scenario.
8)
Scenario: Validate Product Details
Given I have no products
And I am on the list of Products
When I follow "New Product"
And I fill in "Title" with ""
And I fill in "Description" with ""
And I fill in "Image Url" with ""
And I fill in "Price" with ""
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
9)Now run the cucumber features/validate_product_details.feature then you can see following.
10)It says all steps are passed. In this scenario we can check alll the validation by writing steps like follows
Scenario: Validate Product Details
Given I have no products
And I am on the list of Products
When I follow "New Product"
And I fill in "Title" with ""
And I fill in "Description" with ""
And I fill in "Image Url" with ""
And I fill in "Price" with ""
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
When I fill in "Title" with "C#"
And I fill in "Description" with ""
And I fill in "Image Url" with ""
And I fill in "Price" with ""
And I press "Create"
Then I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
When I fill in "Title" with "C#"
And I fill in "Description" with ""
And I fill in "Image Url" with ""
And I fill in "Price" with "23"
And I press "Create"
Then I should see "Description can't be blank"
And I should see "Image url can't be blank"
When I fill in "Title" with "C#" .......
like wise we can write so many steps.
11)But you can see that is not much effective because write all the validation like this is not good. What can we do for it. Think a little bit....
12)If you can remember the last post why we can't use that. Then the above scenario can be written as follows.
Scenario: Validate Product Details
Given I have no products
And I am on the list of Products
When I follow "New Product"
When I fill in the following:
| Title | |
| Description | |
| Image Url | |
| Price | |
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
13)Now run the cucumber features/validate_product_details.feature
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXWx6nkJ05AYrAPNXrASffsQ9wDpH0VJmyP8y-RwWxbHzKRk2Ln6JhqEaLQk1vZoQfE5ndbRfNsddELqHFsCHZs7Vh4Inj8b_Dw74KtPhWA2mNNkdiSKcZeUVnbZVF7EBCsEAY5vcGn10/s1600-h/5.png">
14)What a simple way to write validation file. Now lets expand this as follows and try to understand to what is happening there.
Scenario: Validate Product Details
Given I have no products
And I am on the list of Products
When I follow "New Product"
When I fill in the following:
| Title | |
| Description | |
| Image Url | |
| Price | |
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
When I fill in the following:
| Title | |
| Description | |
| Image Url | |
| Price | 20 |
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Image url can't be blank"
When I fill in the following:
| Title | |
| Description | |
| Image Url | a.jpg |
| Price | |
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Price is not a number"
When I fill in the following:
| Title | |
| Description | My name is JTK |
| Image Url | |
| Price | |
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
When I fill in the following:
| Title | JTK |
| Description | |
| Image Url | |
| Price | |
And I press "Create"
Then I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
15)Now run the cucumber features/validate_product_details.feature now try to write your own validation files for your projects.
What can we do further with our project. Hmmmmm... We can validate user inputs . Lets see how can the validations can be done using cucumber.
What can we validate. We can validate “user inputs are OK such as is price is a numerical value or not and all the fields are not empty etc..”
Before doing the cucumber part lets see the what is happening in GUI part.
Go to the product/app/models/ folder and open product.rb file. Afetr that copy and paste following codes to it as follows.
class Product < ActiveRecord::Base
validates_presence_of :title, :description, :image_url
validates_numericality_of :price
end
Now lets see the GUI.
1)First go to the product folder in the terminal and then run the server “ruby script/server”
2) Then gotothe browser and type “http://localhost:3000/products” . Then you can see following GUI
3)click on New product link and you can see this page.
4)Now check what is happening when click on create button without filling any field. You can see following error massages.
5)Now you can see what is happening when there is one field is filling and click create button. Check them with your self.
6)Now lets see how the cucumber can use for this.
7)Go to the feature folder and create a new file called validate_product_details.feature and copy and paste following scenario.
8)
Scenario: Validate Product Details
Given I have no products
And I am on the list of Products
When I follow "New Product"
And I fill in "Title" with ""
And I fill in "Description" with ""
And I fill in "Image Url" with ""
And I fill in "Price" with ""
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
9)Now run the cucumber features/validate_product_details.feature then you can see following.
10)It says all steps are passed. In this scenario we can check alll the validation by writing steps like follows
Scenario: Validate Product Details
Given I have no products
And I am on the list of Products
When I follow "New Product"
And I fill in "Title" with ""
And I fill in "Description" with ""
And I fill in "Image Url" with ""
And I fill in "Price" with ""
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
When I fill in "Title" with "C#"
And I fill in "Description" with ""
And I fill in "Image Url" with ""
And I fill in "Price" with ""
And I press "Create"
Then I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
When I fill in "Title" with "C#"
And I fill in "Description" with ""
And I fill in "Image Url" with ""
And I fill in "Price" with "23"
And I press "Create"
Then I should see "Description can't be blank"
And I should see "Image url can't be blank"
When I fill in "Title" with "C#" .......
like wise we can write so many steps.
11)But you can see that is not much effective because write all the validation like this is not good. What can we do for it. Think a little bit....
12)If you can remember the last post why we can't use that. Then the above scenario can be written as follows.
Scenario: Validate Product Details
Given I have no products
And I am on the list of Products
When I follow "New Product"
When I fill in the following:
| Title | |
| Description | |
| Image Url | |
| Price | |
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
13)Now run the cucumber features/validate_product_details.feature
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXWx6nkJ05AYrAPNXrASffsQ9wDpH0VJmyP8y-RwWxbHzKRk2Ln6JhqEaLQk1vZoQfE5ndbRfNsddELqHFsCHZs7Vh4Inj8b_Dw74KtPhWA2mNNkdiSKcZeUVnbZVF7EBCsEAY5vcGn10/s1600-h/5.png">
14)What a simple way to write validation file. Now lets expand this as follows and try to understand to what is happening there.
Scenario: Validate Product Details
Given I have no products
And I am on the list of Products
When I follow "New Product"
When I fill in the following:
| Title | |
| Description | |
| Image Url | |
| Price | |
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
When I fill in the following:
| Title | |
| Description | |
| Image Url | |
| Price | 20 |
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Image url can't be blank"
When I fill in the following:
| Title | |
| Description | |
| Image Url | a.jpg |
| Price | |
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Description can't be blank"
And I should see "Price is not a number"
When I fill in the following:
| Title | |
| Description | My name is JTK |
| Image Url | |
| Price | |
And I press "Create"
Then I should see "Title can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
When I fill in the following:
| Title | JTK |
| Description | |
| Image Url | |
| Price | |
And I press "Create"
Then I should see "Description can't be blank"
And I should see "Image url can't be blank"
And I should see "Price is not a number"
15)Now run the cucumber features/validate_product_details.feature now try to write your own validation files for your projects.
Subscribe to:
Posts (Atom)