Synopsis
Based on the popular series of books by Darren Shan, Cirque du Freak: The Vampire's Assistant tells the story of a small-town teen who inadvertently shatters a 200-year-old truce between warring factions of vampires. Sixteen-year-old Darren (Chris Massoglia) is your typical adolescent; he spends most of his time with his best friend, Steve (Josh Hutcherson), earns decent grades, and generally manages to stay out of trouble. But trouble finds Darren when he and Steve make the acquaintance of a vampire named Larten Crepsley (John C. Reilly) while attending a traveling freak show at a local theater. Transformed into a bloodsucker by Crepsley, Darren joins the Cirque du Freak and quickly ingratiates himself with the unusual cast of characters who populate it, including Madame Truska the Bearded Lady (Salma Hayek) and the traveling sideshow's towering barker (Ken Watanabe). As Darren works to master his newfound powers as a budding member of the supernatural underworld, he becomes a valued pawn between the vampires and their deadlier rivals, the Vampanese. With tensions between the two sects intensifying, Darren must figure out a means of keeping the coming war from destroying his last vestige of humanity. Patrick Fugit, Orlando Jones, Willem Dafoe, and Jane Krakowski co-star. - Jason Buchanan, All Movie Guide
Movie Info
Starring:John C. Reilly, Ken Watanabe, Josh Hutcherson, Chris Massoglia, Ray Stevenson
Theatrical Release Date:10/23/2009
Rating:PG-13
Run Time:108 min.
Distributor(s):Universal
Director(s):Paul Weitz
Genre(s):Action, Family, Fantasy
Themes:Vampires, Metamorphosis
Tone:Humorous, Stylized
Country of Origin:USA (10-23-2009)
Language:English
The Vampire's Assistant
Posted by ජීවන්ත තාරක (Jeewantha Tharaka Kodikara) at 5:07 PM 0 comments
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.
Posted by ජීවන්ත තාරක (Jeewantha Tharaka Kodikara) at 3:34 PM 0 comments
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/AVvXsEiaQD7rNpHoYBhgzg21XQiHOEH_8Jh02dNuAdP0oKgQBuNYlolS3o01DToXvYZ3QdZIj_HiUdi5RtfodqhQLnUXivHK4TiiWY3fuRYCIqvfi0SIGn6X5UacXBI-qvxxAgK5XghdRY7HIXQ/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.
Posted by ජීවන්ත තාරක (Jeewantha Tharaka Kodikara) at 12:54 PM 0 comments