Scripted GUI Testing with Ruby (Pragmatic Programmers) by Ian Dees

By Ian Dees

Scripted GUI trying out with Ruby is a realistic, quick-moving educational according to actual existence, and real-world GUI applications.

correct out of the gate you'll commence operating with code to force a computer GUI. You'll become aware of the types of gotchas and part instances that don't exist in basic, toy courses. As you upload extra exams, you'll how to manage your try code and write lucid examples. the result's a chain of "smoke tests" workforce will run on non-stop Integration servers.

subsequent, we'll discover various assorted checking out tips and tips. You'll hire a chain of more and more random and punishing try out monkeys to aim to crash courses. Table-driven recommendations will make it easier to cost dozens of alternative enter mixtures. See easy methods to use longer reputation exams (in the shape of reports) to symbolize the best way a standard client may use your program.

The e-book makes use of examples from home windows, OS X, and cross-platform Java computer courses in addition to net purposes. You'll increase attempt scripts in Ruby; you don't have to be a Ruby specialist, yet simple convenience with the language might be helpful.

Show description

Read Online or Download Scripted GUI Testing with Ruby (Pragmatic Programmers) PDF

Best software development books

Software Engineering for Modern Web Applications: Methodologies and Technologies

As smooth corporations migrate from older info architectures to new Web-based platforms, the self-discipline of software program engineering is altering either by way of applied sciences and methodologies. there's a have to research this new frontier from either a theoretical and pragmatic viewpoint, and provide not just a survey of latest applied sciences and methodologies yet discussions of the applicability and pros/cons of every.

Advances in Computers, Vol. 11

On the grounds that its first quantity in 1960, Advances in desktops has offered distinct assurance of ideas in and software program and in desktop concept, layout, and purposes. It has additionally supplied participants with a medium within which they could learn their topics in better intensity and breadth than that allowed by means of general magazine articles.

Lean architecture for agile software development

Progressively more Agile tasks are looking for architectural roots as they try with complexity and scale - and they are looking light-weight how one can do it nonetheless looking? during this book the authors help you in finding your individual course Taking cues from Lean development, they can assist steer your venture towards practices with longstanding music documents Up-front structure?

Advances in Computers and Information in Engineering Research

This ebook sequence goals to trap advances in pcs and data in engineering learn, in particular via researchers and contributors of ASME's desktops & info in Engineering (CIE) department. The books may be released in either conventional and e-book codecs. The sequence is targeting advances in computational tools, algorithms, instruments, and procedures at the leading edge of analysis and improvement as they've got developed and/or were stated over the last 3 to 5 annual CIE meetings.

Additional resources for Scripted GUI Testing with Ruby (Pragmatic Programmers)

Example text

Slim Packaging We’ll start simply with a new Window class, which will just be a thin wrapper around a window handle. 6. length, buffer length == 0 ? length - 1] end end end You may have noticed at ➊ that we’re including WindowsGui inside a class that’s nested in WindowsGui. This might well seem a little circular, but I promise it will work. All those API calls we need will get imported just fine. The other thing we’ve added is a wait_for_close( ) method at ➋, which in turn relies on another Windows API call, IsWindowVisible( ).

Type_text "this is some text" You may have noticed in ➋ that we changed the method name to type_ text( ), with an underscore and different capitalization. As we discovered in the previous section, JRuby lets us use a more Ruby-friendly alternate spelling for any Java method. Since we’re writing our test script in Ruby, we’ll use the Ruby-style names from here on out. The text area belongs to the main window, so at ➊, JTextAreaOperator takes its parent, main_window, as a parameter at creation time.

Special Promotion We’d like to figure out a way to “promote” a Win32API object to a method. The naïve way to do it would be to wrap each object in a method. Fans of design patterns are jumping on their chairs yelling, “Factory! Factory! ” right about now. 2. call wnd_class, title end This is a decent first start, but we’re repeating the name of the Windows function in no fewer than four places! And we’d have to repeat this structure, too, for each API function we want to use. rb module WindowsGui def_api 'FindWindow' , def_api 'keybd_event' , ['P' , 'P' ], 'L' ['I' , 'I' , 'L' , 'L' ], 'V' # rest of API definitions here...

Download PDF sample

Rated 4.95 of 5 – based on 8 votes