X hits on this document

PDF document

Web Application Testing in Ruby - page 30 / 34

80 views

0 shares

0 downloads

0 comments

30 / 34

Introduction to Ruby Introduction to WATIR Testing Web Applications

Test Frameworks Test::Unit Demo

Assertions == Expected Results

Use ‘assert’ instead of writing your own if statement checks

Test::Unit assertions include the following:

assert(boolean) # fails if boolean is false or nil assert_equal(1, 1) assert_not_equal(1, 0) assert_match(/test/, "test") assert_no_match(/test/, "dfjlas") flunk("force test to fail") # forces test to fail

Other libraries may extend the default set

Paul Carvalho

Web Application Testing in Ruby

Document info
Document views80
Page views80
Page last viewedThu Dec 08 08:08:52 UTC 2016
Pages34
Paragraphs380
Words2437

Comments