Sunday, June 22, 2014
Saturday, June 21, 2014
What is Maven ?
Build tool
Standard project structure
Java project tasks simpler
configure maven in five minutes :
http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
For video tutorial : (This video will be helpful for beginners who want to know about JDK, MAVEN and IDE)
http://javafortesters.blogspot.co.uk/p/install.html
Good comparison between Maven and Ant were explained in detail in below post .
http://stackoverflow.com/questions/603189/differences-between-ant-and-maven
Standard project structure
Java project tasks simpler
- mvm clean compile
- mvm clean package
- man clean install
- mvn db-migration:reset -P test
- mvn db-migration:migrate -P test
Download latest version of maven :
configure maven in five minutes :
http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
For video tutorial : (This video will be helpful for beginners who want to know about JDK, MAVEN and IDE)
http://javafortesters.blogspot.co.uk/p/install.html
Good comparison between Maven and Ant were explained in detail in below post .
http://stackoverflow.com/questions/603189/differences-between-ant-and-maven
Friday, June 20, 2014
How to setup capybara with cucumber in 5 mins?
- create test directory (mkdir test)
- \curl -L https://get.rvm.io | bash -s stable —ruby
- gem install cucumber
- gem install capybara
- mkdir features\support
- mkdir features\step_definitions
Capybara settings
Create env.rb file under support folder with following content
require 'capybara/cucumber'
Capybara.default_driver = :selenium
Cucumber scenarios
Create test.feature file under features folder
Feature: Find the automationhints blog
Scenario: Search for the blog
Given I am on the Google homepage
Then I will search for "automationhints.blogspot"
Then I should see "Vijay Ragavan"
Step definitions for cucumber steps
Create my_steps.rb file under step_definitions directory.
Given(/^I am on the Google homepage$/) do
visit 'http://www.google.co.in'
end
Then(/^I will search for "([^"]*)"$/) do |arg|
fill_in 'gbqfq', :with => arg + "\n"
end
Then(/^I should see "([^"]*)"$/) do |text|
page.should have_content(text)
end
RUN
Navigate to test folder in console and type command as "cucumber". it will run all scenarios which is part of feature files.
Server side Monitoring
Long back taken session on server side monitoring in Thought works . How can monitor server performance while executing performance test cases against web application . I have installed Graphite server in one of ubuntu vms and then configure graphite client on agent machines (application server, database , networks engine.)
Graphite
Presentation :
https://drive.google.com/file/d/0B_5gBErIQ4aAVTBQbjBXVjJqZW8/edit?usp=sharing
Graphite
Setup graphite server on ubuntu:
Starting Graphite :
sudo ./carbon-cache.py start
Diamond
sudo service diamond start
Collectors:
To edit agent info : sudo nano /etc /diamond/diamond.conf
Linux server monitoring Tools and benefits :
- Monit : Process monitoring
- Nagios : Alerting system
- Graphite : Tracking and Trending
- Windows : PerfMom
Presentation :
https://drive.google.com/file/d/0B_5gBErIQ4aAVTBQbjBXVjJqZW8/edit?usp=sharing
How Quality Engineer can update himself on daily basis?
Following http://stackoverflow.com/, https://github.com/trending, google tech talk videos, Tech Radar and participating on active forum .
Reading blogs & magazine:
- Google : http://googletesting.blogspot.in/
- James Bach : http://www.satisfice.com/blog/
- Martin Fowler : http://martinfowler.com/
- Reading Hacker News : http://thehackernews.com/
- Reading magazine : http://www.automatedtestinginstitute.com/home/
Need to find three integers which can equal Pythagoras' Theorem (a^2+ b^2= C^2) and a+b+c=1000
Have tried with some math logics to solve this problem .
a^2+ b^2= C^2
a+b+c=1000
Finally with help of computer solved this problem..
for a in 1..500
for b in 1..500
for c in 1..500
if (a+b+c) == 1000
if (a*a) +(b*b) == (c*c)
p a,b,c
exit
end
end
end
end
end
Results : 200 ,375 ,425
a^2+ b^2= C^2
a+b+c=1000
Finally with help of computer solved this problem..
for a in 1..500
for b in 1..500
for c in 1..500
if (a+b+c) == 1000
if (a*a) +(b*b) == (c*c)
p a,b,c
exit
end
end
end
end
end
Results : 200 ,375 ,425
Thursday, June 19, 2014
Ruby : How to list all methods of element or object?
A way to list methods of list in ruby
> list=[1,2,3,4,5] # define one list
=> [1, 2, 3, 4, 5]
> list.sort
=> [1, 2, 3, 4, 5]
> list.methods.sort -1.methods # -1 exclude other object methods.
=> [:[]=, :all?, :any?, :assoc, :at, :bsearch, :chunk, :clear, :collect, :collect!, :collect_concat, :combination, :compact, :compact!, :concat, :count, :cycle, :delete, :delete_at, :delete_if, :detect, :drop, :drop_while, :each, :each_cons, :each_entry, :each_index, :each_slice, :each_with_index, :each_with_object, :empty?, :entries, :fetch, :fill, :find, :find_all, :find_index, :first, :flat_map, :flatten, :flatten!, :grep, :group_by, :include?, :index, :inject, :insert, :join, :keep_if, :last, :lazy, :length, :map, :map!, :max, :max_by, :member?, :min, :min_by, :minmax, :minmax_by, :none?, :one?, :pack, :partition, :permutation, :pop, :product, :push, :rassoc, :reduce, :reject, :reject!, :repeated_combination, :repeated_permutation, :replace, :reverse, :reverse!, :reverse_each, :rindex, :rotate, :rotate!, :sample, :select, :select!, :shift, :shuffle, :shuffle!, :slice, :slice!, :slice_before, :sort, :sort!, :sort_by, :sort_by!, :take, :take_while, :to_a, :to_ary, :transpose, :uniq, :uniq!, :unshift, :values_at, :zip]
> list=[1,2,3,4,5] # define one list
=> [1, 2, 3, 4, 5]
> list.sort
=> [1, 2, 3, 4, 5]
> list.methods.sort -1.methods # -1 exclude other object methods.
=> [:[]=, :all?, :any?, :assoc, :at, :bsearch, :chunk, :clear, :collect, :collect!, :collect_concat, :combination, :compact, :compact!, :concat, :count, :cycle, :delete, :delete_at, :delete_if, :detect, :drop, :drop_while, :each, :each_cons, :each_entry, :each_index, :each_slice, :each_with_index, :each_with_object, :empty?, :entries, :fetch, :fill, :find, :find_all, :find_index, :first, :flat_map, :flatten, :flatten!, :grep, :group_by, :include?, :index, :inject, :insert, :join, :keep_if, :last, :lazy, :length, :map, :map!, :max, :max_by, :member?, :min, :min_by, :minmax, :minmax_by, :none?, :one?, :pack, :partition, :permutation, :pop, :product, :push, :rassoc, :reduce, :reject, :reject!, :repeated_combination, :repeated_permutation, :replace, :reverse, :reverse!, :reverse_each, :rindex, :rotate, :rotate!, :sample, :select, :select!, :shift, :shuffle, :shuffle!, :slice, :slice!, :slice_before, :sort, :sort!, :sort_by, :sort_by!, :take, :take_while, :to_a, :to_ary, :transpose, :uniq, :uniq!, :unshift, :values_at, :zip]
Subscribe to:
Posts (Atom)
560 Free Online Courses
Top 200 universities launched 500 free online courses. Please find the list here .