SlideShare a Scribd company logo
Why Every Tester
Should Learn Ruby
Agile
                                     Open-
Technology                           source
                                     github.com/rsim
    Ruby
 JavaScript
              Raimonds Simanovskis



                       @rsim

                         .com
Who are testers?




    Robots?
Who are testers?




... or automation ninjas
   who create robots?
Many Tools
Many Scripting
 Languages
HP (former Mercury)
   VBScript dialect
IBM Rational Robot
SQABasic (VB dialect)
  declare sub CheckSave     'allocate name defined below.
  '$Include "sqautil.sbh"    'used for datapool scripts.
  '$Include "global.sbh"     'used by all scripts.
  Sub Main
  !   Dim Result As Integer
  !   'Explicitly declare variable:
  !   !   dim strOpSys As String, strFileName As String
  !   !   dim strScriptUsed As String, strReturn As Integer
  !   !   const SCRIPTUSED As String = "Using Script 5/8/99"

  !   'Assuming that the application is opened by the calling module:
  !   'Press Alt-File, Save As to open dialog box:
  !   !   InputKeys %"FA"
  !   !   '    MenuSelect "File->Save As..." not used

  !   'Analyze pop-up window to detect and handle unexpected dialog:
  !   !   'Instead of Window SetContext, "Caption=Save As", ""
  !   !   'which is not generic:
  !   !   Window SetContext, "Current Window"
  !   !   'Get object name...
  !   !   'Is it save as? ...

  !   !   'Any other errors?
  !   !   Assert ...
  !   !   'If an error is found, stop! ...
  !   !   'Push a button that says "Save"
  !   !   PushButton Click, "Text=Save"

  !   SQADataPoolOpen
  !   Do while not EOF(1)
  !   !   'Fetch the next record from the datapool:
IBM Rational Robot
RobotJ (Java + libraries)
import resources.First_oneHelper;
import com.rational.test.ft.*;
import com.rational.test.ft.object.interfaces.*;
import com.rational.test.ft.script.*;
import com.rational.test.ft.value.*;
import com.rational.test.ft.vp.*;
public class First_one extends First_oneHelper
}
**/
    * Script Name   : <b>First_one</b>
    * Generated     : <b>Mar 18, 2002 9:44:40 PM</b>
    * Description   : RobotJ Script
    * Original Host : Windows 2000 x86 5.0
    * Original Host : WinNT Version 5.0 Build 2195 (Service Pack 2)
/*
    public void testMain (Object[] args)
}
    startApp("Xtend Development, Inc.");
    consultingsmjpg_textVP().performTest();
   // Document: Xtend Development, Inc.: http://www.xtenddev.com/
    Link_SiteMap().click();
    Link_SearchEngine().click();
    Text_query().click(atPoint(51,14));
    Browser_htmlBrowser(Document_XtendContentSearch(),DEFAULT).inputKeys("rational");
    Button_Submit().click();
    Link_XtendOnDemandVideoLibrary().click();
    Document_XtendOnDemandVideoLib().drag(atPoint(754,247),atPoint(753,450));
    Link_VisualTest6Indepth().click();
    Document_VT6InDepthVideos().drag(atPoint(755,137),atPoint(754,203));
    Image_buygif().click();
    Button_CheckOutsubmit().click();
    Text_name().click(atPoint(29,13));
    name_textVP().performTest();
    Text_name().click(atPoint(35,10));
IBM Rational Robot
VU (Load & performance tests)
    set Server_connection = D10_91_46_90_6;

    http_header_recv ["Home020"]   200;       /* OK */

    http_nrecv ["Home021"] 100 %% ;          /* 2611 bytes */
    check_failure(_response, orgid, version_date, _script, _lineno);

    stop_time ["Home"]; /* Stop_Block */

    pop Http_control;
    Beginning of the next script:
    set Server_connection = D10_91_46_90_6; //I2

     /* Keep-Alive request over connection D10_91_46_90_6 */
    http_request ["CBDSum001"]
       "GET /baliweb_ver_" + http_url_encode(version_date) + "_UAT_P20_adc/xml/TB
          TxnHistoryWI.xml HTTP/1.1rn"
       "Accept: */*rn"
       "Referer: https://10.91.46.90/baliweb_ver_" + http_url_encode(version_date +
          "_UAT_P20_adc/site/lightho"
       "rz800/en/html/codegen/rn"
       "Accept-Encoding: gzip, deflatern"
       "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR"
       " 1.1.4322)rn"
       "Host: 10.91.46.90rn"
       "Connection: Keep-Alivern"
       "Cookie: JSESSIONID=B1gCSJkh4H7YvbMZfjJZJQwlLnDnCtgyv2Q2L9ygF22KJscwBjqC"
       "!-32148467!NONErn"
       "rn";
    start_time ["CBDSum"] _fs_ts;
Oracle Application Test Suite
         OpenScript
Better Alternatives for
    Test Scripting
       General purpose
     programming language
        Multi-platform
        Many libraries

         Open-source
Tester’s

                object-oriented
                   dynamic
             programming language
              simple from outside
 Yukihiro
Matsumoto
 or “Matz”      powerful inside
Simple but Powerful
Everything is object
5.times { print "We *love* Ruby -- it's outrageous!" }


                                         class Numeric
                                           def plus(x)
                                             self.+(x)
                       Flexible and        end
                        extensible       end

                                         y = 5.plus 6
                                         # y is now equal to 11
Iterators and blocks
search_engines =
  %w[Google Yahoo MSN].map do |engine|
    "http://www." + engine.downcase + ".com"
  end
Ruby platforms


       MRI         JRuby     IronRuby   MacRuby


Unix   Mac   Win   Java VM   MS .NET    Mac OS X
High Testing
Culture in Ruby
 Community

   TATFT
 Test All The F****** Time
High Testing
Culture in Ruby
 Community

   TATFT
 Test All The F****** Time
High Testing
Culture in Ruby
 Community

   TATFT
 Test All The F****** Time
High Testing
Culture in Ruby
 Community

   TATFT
 Test All The F****** Time
Test script examples
     with Ruby
Web Testing
               with Selenium
require "selenium/client"

describe "Google search" do
  before(:all) do
    @browser = Selenium::Client::Driver.new(:host => "localhost",:port => 4444,
      :browser => "*firefox",:url => "http://www.google.com")
  end
  before(:each) do
    @browser.start_new_browser_session
  end
  after(:each) do
    @browser.close_current_browser_session
  end

  it "should find Ruby programming language home page" do
    @browser.open "/"
    @browser.title.should == "Google"
    @browser.type "q", "ruby"
    @browser.click "btnG", :wait_for => :element, :element => 'rso'
    @browser.title.should =~ /^ruby - Google/
    @browser.text?("ruby-lang.org").should be_true
  end
end
... or with Watir
require "safariwatir"

describe "Google search" do
  before(:all) do
    @browser = Watir::Safari.new
  end
  after(:all) do
    @browser.close
  end
  before(:each) do
    @browser.goto "http://google.com"
  end

  it "should find Ruby programming language home page" do
    @browser.title.should == "Google"
    @browser.text_field(:name, "q").set "ruby"
    @browser.button(:name, "btnG").click
    @browser.title.should =~ /^ruby - Google/
    @browser.text.include?("ruby-lang.org").should be_true
  end
end
Tests as Executable
   Specification
require 'java'
          require 'jemmy.jar'
          require 'junquenote_app'

          java_import 'org.netbeans.jemmy.JemmyProperties'
          java_import 'org.netbeans.jemmy.TestOut'

          %w(Frame TextArea MenuBar Dialog Button).each do |o|
            java_import "org.netbeans.jemmy.operators.J#{o}Operator"
          end




 Java
          JemmyProperties.set_current_timeout 'DialogWaiter.WaitDialogTimeout', 1000
          JemmyProperties.set_current_output TestOut.get_null_output

          describe "Notes application" do
            def create_application
                                                                  Java
                                                                 classes
  GUI
              JunqueNoteApp.new
              @main_window = JFrameOperator.new 'JunqueNote'
            end

           def exit_application



testing
             menu = JMenuBarOperator.new @main_window
             menu.push_menu_no_block 'File|Exit', '|'
             if dialog = (JDialogOperator.new "Quittin' time" rescue nil)
               button = JButtonOperator.new dialog, "No"
               button.push
             end


  with
           end

           def edit_text_area
             JTextAreaOperator.new @main_window
           end



JRuby      before { create_application }
           after { exit_application }

           it 'launches with a welcome message' do
             edit_text_area.text.should =~ /Welcome/
           end

           it "allows to type in text" do
             original_text = edit_text_area.text
             edit_text_area.type_text "this is some text"
             edit_text_area.text.should == "this is some text#{original_text}"
           end

          end
describe "Remove rooms by name" do
                before(:all) do
                  plsql.rooms.insert_values(
                    [:room_key, :name],
                    [1, 'Dining Room'],

         tables
                    [2, 'Living Room'],




  Oracle
                    [3, 'Office'],
                    [4, 'Bathroom'],
                    [5, 'Bedroom']
                  )
                  plsql.room_contents.insert_values(
                    [:contents_key, :room_key, :name],




 PL/SQL
                    [1, 1, 'Table'],
                    [2, 1, 'Hutch'],
                    [3, 1, 'Chair'],
                    [4, 2, 'Sofa'],
                    [5, 2, 'Lamp'],
                    [6, 3, 'Desk'],

                                                  procedure
  Testing
                    [7, 3, 'Chair'],
                    [8, 3, 'Computer'],
                    [9, 3, 'Whiteboard']
                  )
                end                                  call

   with
                  it "should remove a room without furniture" do
                    rooms_without_b = plsql.rooms.all("WHERE name NOT LIKE 'B%'")
                    plsql.remove_rooms_by_name('B%')
                    plsql.rooms.all.should == rooms_without_b
                  end

                  it "should not remove a room with furniture" do



ruby-plsql-
                    lambda {
                      lambda {
                        plsql.remove_rooms_by_name('Living Room')
                      }.should raise_error(/ORA-02292/)
                    }.should_not change { plsql.rooms.all }
                  end



   spec           it "should raise exception when NULL value passed" do
                    lambda {
                      lambda {
                        plsql.remove_rooms_by_name(NULL)
                      }.should raise_error(/program error/)
                    }.should_not change { plsql.rooms.all }
                  end

              end
More information
     http://ruby-lang.org


  http://pragprog.com/titles/idgtr/
   scripted-gui-testing-with-ruby



   http://github.com/rsim/
       ruby-plsql-spec

More Related Content

What's hot

The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
Fernando Hamasaki de Amorim
 
Introduction to Nodejs
Introduction to NodejsIntroduction to Nodejs
Introduction to Nodejs
Gabriele Lana
 
Http4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackHttp4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web Stack
GaryCoady
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot Camp
Troy Miles
 
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScriptWorkshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScript
Visual Engineering
 
Annotation processing and code gen
Annotation processing and code genAnnotation processing and code gen
Annotation processing and code gen
koji lin
 
JavaScript Unit Testing with Jasmine
JavaScript Unit Testing with JasmineJavaScript Unit Testing with Jasmine
JavaScript Unit Testing with Jasmine
Raimonds Simanovskis
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
Dr Nic Williams
 
G*ワークショップ in 仙台 Grails(とことん)入門
G*ワークショップ in 仙台 Grails(とことん)入門G*ワークショップ in 仙台 Grails(とことん)入門
G*ワークショップ in 仙台 Grails(とことん)入門
Tsuyoshi Yamamoto
 
Say Hello To Ecmascript 5
Say Hello To Ecmascript 5Say Hello To Ecmascript 5
Say Hello To Ecmascript 5Juriy Zaytsev
 
5 Tips for Better JavaScript
5 Tips for Better JavaScript5 Tips for Better JavaScript
5 Tips for Better JavaScript
Todd Anglin
 
Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Anton Arhipov
 
Testing your javascript code with jasmine
Testing your javascript code with jasmineTesting your javascript code with jasmine
Testing your javascript code with jasmineRubyc Slides
 
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Domenic Denicola
 
Mobile Open Day: React Native: Crossplatform fast dive
Mobile Open Day: React Native: Crossplatform fast diveMobile Open Day: React Native: Crossplatform fast dive
Mobile Open Day: React Native: Crossplatform fast dive
epamspb
 
Node.js - Best practices
Node.js  - Best practicesNode.js  - Best practices
Node.js - Best practices
Felix Geisendörfer
 
Rest in flask
Rest in flaskRest in flask
Rest in flask
Yehor Nazarkin
 
Ten useful JavaScript tips & best practices
Ten useful JavaScript tips & best practicesTen useful JavaScript tips & best practices
Ten useful JavaScript tips & best practices
Ankit Rastogi
 
Ruby on Rails Oracle adaptera izstrāde
Ruby on Rails Oracle adaptera izstrādeRuby on Rails Oracle adaptera izstrāde
Ruby on Rails Oracle adaptera izstrādeRaimonds Simanovskis
 

What's hot (20)

Scala active record
Scala active recordScala active record
Scala active record
 
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
 
Introduction to Nodejs
Introduction to NodejsIntroduction to Nodejs
Introduction to Nodejs
 
Http4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackHttp4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web Stack
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot Camp
 
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScriptWorkshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScript
 
Annotation processing and code gen
Annotation processing and code genAnnotation processing and code gen
Annotation processing and code gen
 
JavaScript Unit Testing with Jasmine
JavaScript Unit Testing with JasmineJavaScript Unit Testing with Jasmine
JavaScript Unit Testing with Jasmine
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
 
G*ワークショップ in 仙台 Grails(とことん)入門
G*ワークショップ in 仙台 Grails(とことん)入門G*ワークショップ in 仙台 Grails(とことん)入門
G*ワークショップ in 仙台 Grails(とことん)入門
 
Say Hello To Ecmascript 5
Say Hello To Ecmascript 5Say Hello To Ecmascript 5
Say Hello To Ecmascript 5
 
5 Tips for Better JavaScript
5 Tips for Better JavaScript5 Tips for Better JavaScript
5 Tips for Better JavaScript
 
Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012
 
Testing your javascript code with jasmine
Testing your javascript code with jasmineTesting your javascript code with jasmine
Testing your javascript code with jasmine
 
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
 
Mobile Open Day: React Native: Crossplatform fast dive
Mobile Open Day: React Native: Crossplatform fast diveMobile Open Day: React Native: Crossplatform fast dive
Mobile Open Day: React Native: Crossplatform fast dive
 
Node.js - Best practices
Node.js  - Best practicesNode.js  - Best practices
Node.js - Best practices
 
Rest in flask
Rest in flaskRest in flask
Rest in flask
 
Ten useful JavaScript tips & best practices
Ten useful JavaScript tips & best practicesTen useful JavaScript tips & best practices
Ten useful JavaScript tips & best practices
 
Ruby on Rails Oracle adaptera izstrāde
Ruby on Rails Oracle adaptera izstrādeRuby on Rails Oracle adaptera izstrāde
Ruby on Rails Oracle adaptera izstrāde
 

Similar to Why Every Tester Should Learn Ruby

soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
soft-shake.ch
 
Jan Stępień - GraalVM: Fast, Polyglot, Native - Codemotion Berlin 2018
Jan Stępień - GraalVM: Fast, Polyglot, Native - Codemotion Berlin 2018Jan Stępień - GraalVM: Fast, Polyglot, Native - Codemotion Berlin 2018
Jan Stępień - GraalVM: Fast, Polyglot, Native - Codemotion Berlin 2018
Codemotion
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
bobmcwhirter
 
General Functions
General FunctionsGeneral Functions
General Functions
BabuDevanandam
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing UpDavid Padbury
 
A tour on ruby and friends
A tour on ruby and friendsA tour on ruby and friends
A tour on ruby and friends旻琦 潘
 
JS class slides (2016)
JS class slides (2016)JS class slides (2016)
JS class slides (2016)
Yves-Emmanuel Jutard
 
JS Class 2016
JS Class 2016JS Class 2016
JS Class 2016
Yves-Emmanuel Jutard
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
Mike Brevoort
 
How to Begin Developing Ruby Core
How to Begin Developing Ruby CoreHow to Begin Developing Ruby Core
How to Begin Developing Ruby Core
Hiroshi SHIBATA
 
Workshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testingWorkshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testing
Visual Engineering
 
Playing With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.jsPlaying With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.js
Mike Hagedorn
 
React Native Evening
React Native EveningReact Native Evening
React Native Evening
Troy Miles
 
Taking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the ExtremeTaking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the Extreme
yinonavraham
 
Implementing new WebAPIs
Implementing new WebAPIsImplementing new WebAPIs
Implementing new WebAPIs
Julian Viereck
 
Nodejs Intro Part One
Nodejs Intro Part OneNodejs Intro Part One
Nodejs Intro Part One
Budh Ram Gurung
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applicationsTom Croucher
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiRan Mizrahi
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
Ortus Solutions, Corp
 

Similar to Why Every Tester Should Learn Ruby (20)

soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 
Jan Stępień - GraalVM: Fast, Polyglot, Native - Codemotion Berlin 2018
Jan Stępień - GraalVM: Fast, Polyglot, Native - Codemotion Berlin 2018Jan Stępień - GraalVM: Fast, Polyglot, Native - Codemotion Berlin 2018
Jan Stępień - GraalVM: Fast, Polyglot, Native - Codemotion Berlin 2018
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
 
General Functions
General FunctionsGeneral Functions
General Functions
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
 
A tour on ruby and friends
A tour on ruby and friendsA tour on ruby and friends
A tour on ruby and friends
 
JS class slides (2016)
JS class slides (2016)JS class slides (2016)
JS class slides (2016)
 
JS Class 2016
JS Class 2016JS Class 2016
JS Class 2016
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
 
How to Begin Developing Ruby Core
How to Begin Developing Ruby CoreHow to Begin Developing Ruby Core
How to Begin Developing Ruby Core
 
Workshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testingWorkshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testing
 
Playing With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.jsPlaying With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.js
 
React Native Evening
React Native EveningReact Native Evening
React Native Evening
 
Taking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the ExtremeTaking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the Extreme
 
Implementing New Web
Implementing New WebImplementing New Web
Implementing New Web
 
Implementing new WebAPIs
Implementing new WebAPIsImplementing new WebAPIs
Implementing new WebAPIs
 
Nodejs Intro Part One
Nodejs Intro Part OneNodejs Intro Part One
Nodejs Intro Part One
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
 

More from Raimonds Simanovskis

Profiling Mondrian MDX Requests in a Production Environment
Profiling Mondrian MDX Requests in a Production EnvironmentProfiling Mondrian MDX Requests in a Production Environment
Profiling Mondrian MDX Requests in a Production Environment
Raimonds Simanovskis
 
Improve Mondrian MDX usability with user defined functions
Improve Mondrian MDX usability with user defined functionsImprove Mondrian MDX usability with user defined functions
Improve Mondrian MDX usability with user defined functions
Raimonds Simanovskis
 
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
Raimonds Simanovskis
 
Data Warehouses and Multi-Dimensional Data Analysis
Data Warehouses and Multi-Dimensional Data AnalysisData Warehouses and Multi-Dimensional Data Analysis
Data Warehouses and Multi-Dimensional Data Analysis
Raimonds Simanovskis
 
mondrian-olap JRuby library
mondrian-olap JRuby librarymondrian-olap JRuby library
mondrian-olap JRuby library
Raimonds Simanovskis
 
eazyBI Overview - Embedding Mondrian in other applications
eazyBI Overview - Embedding Mondrian in other applicationseazyBI Overview - Embedding Mondrian in other applications
eazyBI Overview - Embedding Mondrian in other applications
Raimonds Simanovskis
 
Atvērto datu izmantošanas pieredze Latvijā
Atvērto datu izmantošanas pieredze LatvijāAtvērto datu izmantošanas pieredze Latvijā
Atvērto datu izmantošanas pieredze Latvijā
Raimonds Simanovskis
 
JRuby - Programmer's Best Friend on JVM
JRuby - Programmer's Best Friend on JVMJRuby - Programmer's Best Friend on JVM
JRuby - Programmer's Best Friend on JVM
Raimonds Simanovskis
 
Agile Operations or How to sleep better at night
Agile Operations or How to sleep better at nightAgile Operations or How to sleep better at night
Agile Operations or How to sleep better at night
Raimonds Simanovskis
 
TDD - Why and How?
TDD - Why and How?TDD - Why and How?
TDD - Why and How?
Raimonds Simanovskis
 
Analyze and Visualize Git Log for Fun and Profit
Analyze and Visualize Git Log for Fun and ProfitAnalyze and Visualize Git Log for Fun and Profit
Analyze and Visualize Git Log for Fun and Profit
Raimonds Simanovskis
 
PL/SQL Unit Testing Can Be Fun
PL/SQL Unit Testing Can Be FunPL/SQL Unit Testing Can Be Fun
PL/SQL Unit Testing Can Be Fun
Raimonds Simanovskis
 
opendata.lv Case Study - Promote Open Data with Analytics and Visualizations
opendata.lv Case Study - Promote Open Data with Analytics and Visualizationsopendata.lv Case Study - Promote Open Data with Analytics and Visualizations
opendata.lv Case Study - Promote Open Data with Analytics and Visualizations
Raimonds Simanovskis
 
Extending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on RailsExtending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on Rails
Raimonds Simanovskis
 
RailsWayCon: Multidimensional Data Analysis with JRuby
RailsWayCon: Multidimensional Data Analysis with JRubyRailsWayCon: Multidimensional Data Analysis with JRuby
RailsWayCon: Multidimensional Data Analysis with JRuby
Raimonds Simanovskis
 
Multidimensional Data Analysis with JRuby
Multidimensional Data Analysis with JRubyMultidimensional Data Analysis with JRuby
Multidimensional Data Analysis with JRuby
Raimonds Simanovskis
 
Rails-like JavaScript using CoffeeScript, Backbone.js and Jasmine
Rails-like JavaScript using CoffeeScript, Backbone.js and JasmineRails-like JavaScript using CoffeeScript, Backbone.js and Jasmine
Rails-like JavaScript using CoffeeScript, Backbone.js and JasmineRaimonds Simanovskis
 
How to Adopt Agile at Your Organization
How to Adopt Agile at Your OrganizationHow to Adopt Agile at Your Organization
How to Adopt Agile at Your OrganizationRaimonds Simanovskis
 
Multidimensional Data Analysis with Ruby (sample)
Multidimensional Data Analysis with Ruby (sample)Multidimensional Data Analysis with Ruby (sample)
Multidimensional Data Analysis with Ruby (sample)Raimonds Simanovskis
 

More from Raimonds Simanovskis (20)

Profiling Mondrian MDX Requests in a Production Environment
Profiling Mondrian MDX Requests in a Production EnvironmentProfiling Mondrian MDX Requests in a Production Environment
Profiling Mondrian MDX Requests in a Production Environment
 
Improve Mondrian MDX usability with user defined functions
Improve Mondrian MDX usability with user defined functionsImprove Mondrian MDX usability with user defined functions
Improve Mondrian MDX usability with user defined functions
 
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
 
Data Warehouses and Multi-Dimensional Data Analysis
Data Warehouses and Multi-Dimensional Data AnalysisData Warehouses and Multi-Dimensional Data Analysis
Data Warehouses and Multi-Dimensional Data Analysis
 
mondrian-olap JRuby library
mondrian-olap JRuby librarymondrian-olap JRuby library
mondrian-olap JRuby library
 
eazyBI Overview - Embedding Mondrian in other applications
eazyBI Overview - Embedding Mondrian in other applicationseazyBI Overview - Embedding Mondrian in other applications
eazyBI Overview - Embedding Mondrian in other applications
 
Atvērto datu izmantošanas pieredze Latvijā
Atvērto datu izmantošanas pieredze LatvijāAtvērto datu izmantošanas pieredze Latvijā
Atvērto datu izmantošanas pieredze Latvijā
 
JRuby - Programmer's Best Friend on JVM
JRuby - Programmer's Best Friend on JVMJRuby - Programmer's Best Friend on JVM
JRuby - Programmer's Best Friend on JVM
 
Agile Operations or How to sleep better at night
Agile Operations or How to sleep better at nightAgile Operations or How to sleep better at night
Agile Operations or How to sleep better at night
 
TDD - Why and How?
TDD - Why and How?TDD - Why and How?
TDD - Why and How?
 
Analyze and Visualize Git Log for Fun and Profit
Analyze and Visualize Git Log for Fun and ProfitAnalyze and Visualize Git Log for Fun and Profit
Analyze and Visualize Git Log for Fun and Profit
 
PL/SQL Unit Testing Can Be Fun
PL/SQL Unit Testing Can Be FunPL/SQL Unit Testing Can Be Fun
PL/SQL Unit Testing Can Be Fun
 
opendata.lv Case Study - Promote Open Data with Analytics and Visualizations
opendata.lv Case Study - Promote Open Data with Analytics and Visualizationsopendata.lv Case Study - Promote Open Data with Analytics and Visualizations
opendata.lv Case Study - Promote Open Data with Analytics and Visualizations
 
Extending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on RailsExtending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on Rails
 
RailsWayCon: Multidimensional Data Analysis with JRuby
RailsWayCon: Multidimensional Data Analysis with JRubyRailsWayCon: Multidimensional Data Analysis with JRuby
RailsWayCon: Multidimensional Data Analysis with JRuby
 
Multidimensional Data Analysis with JRuby
Multidimensional Data Analysis with JRubyMultidimensional Data Analysis with JRuby
Multidimensional Data Analysis with JRuby
 
Rails-like JavaScript using CoffeeScript, Backbone.js and Jasmine
Rails-like JavaScript using CoffeeScript, Backbone.js and JasmineRails-like JavaScript using CoffeeScript, Backbone.js and Jasmine
Rails-like JavaScript using CoffeeScript, Backbone.js and Jasmine
 
How to Adopt Agile at Your Organization
How to Adopt Agile at Your OrganizationHow to Adopt Agile at Your Organization
How to Adopt Agile at Your Organization
 
Multidimensional Data Analysis with Ruby (sample)
Multidimensional Data Analysis with Ruby (sample)Multidimensional Data Analysis with Ruby (sample)
Multidimensional Data Analysis with Ruby (sample)
 
PL/SQL Unit Testing Can Be Fun!
PL/SQL Unit Testing Can Be Fun!PL/SQL Unit Testing Can Be Fun!
PL/SQL Unit Testing Can Be Fun!
 

Recently uploaded

Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 

Recently uploaded (20)

Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 

Why Every Tester Should Learn Ruby

  • 2. Agile Open- Technology source github.com/rsim Ruby JavaScript Raimonds Simanovskis @rsim .com
  • 4. Who are testers? ... or automation ninjas who create robots?
  • 6. HP (former Mercury) VBScript dialect
  • 7. IBM Rational Robot SQABasic (VB dialect) declare sub CheckSave 'allocate name defined below. '$Include "sqautil.sbh" 'used for datapool scripts. '$Include "global.sbh" 'used by all scripts. Sub Main ! Dim Result As Integer ! 'Explicitly declare variable: ! ! dim strOpSys As String, strFileName As String ! ! dim strScriptUsed As String, strReturn As Integer ! ! const SCRIPTUSED As String = "Using Script 5/8/99" ! 'Assuming that the application is opened by the calling module: ! 'Press Alt-File, Save As to open dialog box: ! ! InputKeys %"FA" ! ! ' MenuSelect "File->Save As..." not used ! 'Analyze pop-up window to detect and handle unexpected dialog: ! ! 'Instead of Window SetContext, "Caption=Save As", "" ! ! 'which is not generic: ! ! Window SetContext, "Current Window" ! ! 'Get object name... ! ! 'Is it save as? ... ! ! 'Any other errors? ! ! Assert ... ! ! 'If an error is found, stop! ... ! ! 'Push a button that says "Save" ! ! PushButton Click, "Text=Save" ! SQADataPoolOpen ! Do while not EOF(1) ! ! 'Fetch the next record from the datapool:
  • 8. IBM Rational Robot RobotJ (Java + libraries) import resources.First_oneHelper; import com.rational.test.ft.*; import com.rational.test.ft.object.interfaces.*; import com.rational.test.ft.script.*; import com.rational.test.ft.value.*; import com.rational.test.ft.vp.*; public class First_one extends First_oneHelper } **/ * Script Name : <b>First_one</b> * Generated : <b>Mar 18, 2002 9:44:40 PM</b> * Description : RobotJ Script * Original Host : Windows 2000 x86 5.0 * Original Host : WinNT Version 5.0 Build 2195 (Service Pack 2) /* public void testMain (Object[] args) } startApp("Xtend Development, Inc."); consultingsmjpg_textVP().performTest(); // Document: Xtend Development, Inc.: http://www.xtenddev.com/ Link_SiteMap().click(); Link_SearchEngine().click(); Text_query().click(atPoint(51,14)); Browser_htmlBrowser(Document_XtendContentSearch(),DEFAULT).inputKeys("rational"); Button_Submit().click(); Link_XtendOnDemandVideoLibrary().click(); Document_XtendOnDemandVideoLib().drag(atPoint(754,247),atPoint(753,450)); Link_VisualTest6Indepth().click(); Document_VT6InDepthVideos().drag(atPoint(755,137),atPoint(754,203)); Image_buygif().click(); Button_CheckOutsubmit().click(); Text_name().click(atPoint(29,13)); name_textVP().performTest(); Text_name().click(atPoint(35,10));
  • 9. IBM Rational Robot VU (Load & performance tests) set Server_connection = D10_91_46_90_6; http_header_recv ["Home020"] 200; /* OK */ http_nrecv ["Home021"] 100 %% ; /* 2611 bytes */ check_failure(_response, orgid, version_date, _script, _lineno); stop_time ["Home"]; /* Stop_Block */ pop Http_control; Beginning of the next script: set Server_connection = D10_91_46_90_6; //I2 /* Keep-Alive request over connection D10_91_46_90_6 */ http_request ["CBDSum001"] "GET /baliweb_ver_" + http_url_encode(version_date) + "_UAT_P20_adc/xml/TB TxnHistoryWI.xml HTTP/1.1rn" "Accept: */*rn" "Referer: https://10.91.46.90/baliweb_ver_" + http_url_encode(version_date + "_UAT_P20_adc/site/lightho" "rz800/en/html/codegen/rn" "Accept-Encoding: gzip, deflatern" "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR" " 1.1.4322)rn" "Host: 10.91.46.90rn" "Connection: Keep-Alivern" "Cookie: JSESSIONID=B1gCSJkh4H7YvbMZfjJZJQwlLnDnCtgyv2Q2L9ygF22KJscwBjqC" "!-32148467!NONErn" "rn"; start_time ["CBDSum"] _fs_ts;
  • 10. Oracle Application Test Suite OpenScript
  • 11. Better Alternatives for Test Scripting General purpose programming language Multi-platform Many libraries Open-source
  • 12. Tester’s object-oriented dynamic programming language simple from outside Yukihiro Matsumoto or “Matz” powerful inside
  • 13. Simple but Powerful Everything is object 5.times { print "We *love* Ruby -- it's outrageous!" } class Numeric def plus(x) self.+(x) Flexible and end extensible end y = 5.plus 6 # y is now equal to 11 Iterators and blocks search_engines = %w[Google Yahoo MSN].map do |engine| "http://www." + engine.downcase + ".com" end
  • 14. Ruby platforms MRI JRuby IronRuby MacRuby Unix Mac Win Java VM MS .NET Mac OS X
  • 15. High Testing Culture in Ruby Community TATFT Test All The F****** Time
  • 16. High Testing Culture in Ruby Community TATFT Test All The F****** Time
  • 17. High Testing Culture in Ruby Community TATFT Test All The F****** Time
  • 18. High Testing Culture in Ruby Community TATFT Test All The F****** Time
  • 19. Test script examples with Ruby
  • 20. Web Testing with Selenium require "selenium/client" describe "Google search" do before(:all) do @browser = Selenium::Client::Driver.new(:host => "localhost",:port => 4444, :browser => "*firefox",:url => "http://www.google.com") end before(:each) do @browser.start_new_browser_session end after(:each) do @browser.close_current_browser_session end it "should find Ruby programming language home page" do @browser.open "/" @browser.title.should == "Google" @browser.type "q", "ruby" @browser.click "btnG", :wait_for => :element, :element => 'rso' @browser.title.should =~ /^ruby - Google/ @browser.text?("ruby-lang.org").should be_true end end
  • 21. ... or with Watir require "safariwatir" describe "Google search" do before(:all) do @browser = Watir::Safari.new end after(:all) do @browser.close end before(:each) do @browser.goto "http://google.com" end it "should find Ruby programming language home page" do @browser.title.should == "Google" @browser.text_field(:name, "q").set "ruby" @browser.button(:name, "btnG").click @browser.title.should =~ /^ruby - Google/ @browser.text.include?("ruby-lang.org").should be_true end end
  • 22. Tests as Executable Specification
  • 23. require 'java' require 'jemmy.jar' require 'junquenote_app' java_import 'org.netbeans.jemmy.JemmyProperties' java_import 'org.netbeans.jemmy.TestOut' %w(Frame TextArea MenuBar Dialog Button).each do |o| java_import "org.netbeans.jemmy.operators.J#{o}Operator" end Java JemmyProperties.set_current_timeout 'DialogWaiter.WaitDialogTimeout', 1000 JemmyProperties.set_current_output TestOut.get_null_output describe "Notes application" do def create_application Java classes GUI JunqueNoteApp.new @main_window = JFrameOperator.new 'JunqueNote' end def exit_application testing menu = JMenuBarOperator.new @main_window menu.push_menu_no_block 'File|Exit', '|' if dialog = (JDialogOperator.new "Quittin' time" rescue nil) button = JButtonOperator.new dialog, "No" button.push end with end def edit_text_area JTextAreaOperator.new @main_window end JRuby before { create_application } after { exit_application } it 'launches with a welcome message' do edit_text_area.text.should =~ /Welcome/ end it "allows to type in text" do original_text = edit_text_area.text edit_text_area.type_text "this is some text" edit_text_area.text.should == "this is some text#{original_text}" end end
  • 24. describe "Remove rooms by name" do before(:all) do plsql.rooms.insert_values( [:room_key, :name], [1, 'Dining Room'], tables [2, 'Living Room'], Oracle [3, 'Office'], [4, 'Bathroom'], [5, 'Bedroom'] ) plsql.room_contents.insert_values( [:contents_key, :room_key, :name], PL/SQL [1, 1, 'Table'], [2, 1, 'Hutch'], [3, 1, 'Chair'], [4, 2, 'Sofa'], [5, 2, 'Lamp'], [6, 3, 'Desk'], procedure Testing [7, 3, 'Chair'], [8, 3, 'Computer'], [9, 3, 'Whiteboard'] ) end call with it "should remove a room without furniture" do rooms_without_b = plsql.rooms.all("WHERE name NOT LIKE 'B%'") plsql.remove_rooms_by_name('B%') plsql.rooms.all.should == rooms_without_b end it "should not remove a room with furniture" do ruby-plsql- lambda { lambda { plsql.remove_rooms_by_name('Living Room') }.should raise_error(/ORA-02292/) }.should_not change { plsql.rooms.all } end spec it "should raise exception when NULL value passed" do lambda { lambda { plsql.remove_rooms_by_name(NULL) }.should raise_error(/program error/) }.should_not change { plsql.rooms.all } end end
  • 25. More information http://ruby-lang.org http://pragprog.com/titles/idgtr/ scripted-gui-testing-with-ruby http://github.com/rsim/ ruby-plsql-spec