Sunday, November 10, 2013

0 test_case

Note: I am using Aptana Studio to explain all the examples in this tutorial.

Class::Log

Method heading
test_case(idValue = 'NA',nameValue = 'NA')

Parameters explained

  1. idValue (optional): every test case has a unique id. Though this is an optional parameter, pass in the id of the test case.
  2. nameValue(optional): every test case has a name given to it. Though this is an optional parameter, pass that value here.

Sample code:


require 'testlogger'
Log.test_script("sample.rb")
 
  Log.test_case(100,"TestCase1")
      Log.message("howdy!!")
  Log.close_test_case
 
Log.close_test_script



Output on console:







Result file explained
Copy the location of the result file and open it in a browser, preferably chrome. You should see something like this,

Note the usage of "close_test_case" method that takes no parameters but defines the scope of test case.

Happy Testing,
Shiva Krishna Imminni

0 comments:

Post a Comment

 

QuestionSelenium Copyright @Shiva Krishna