Tellurium is a UI module based web testing framework. The UI module is a collection of UI elements you group together. Usually, the UI module represents a composite UI object in the format of nested basic UI elements. The UI module makes it possible to build UI elements' locators at run time. The framework does object to locator mapping (OLM) automatically at run time so that you can define UI objects simply by their attributes and write your selenium tests just like writing JUnit/TestNG tests. Since the framework constructs the actual locator automatically at run-time and it uses the Group Locating Concept (GLC) to exploit information inside a collection of UI components to help finding their locators, Tellurium is more robust, flexible, reusable compared with the Selenium testing framework.
This is a short version.
This document provides an overview of Selenium WebDriver. It begins by explaining what Selenium is and that it is used to automate testing of web applications across different browsers. It then discusses the various components of Selenium, including Selenium IDE, Selenium Remote Control (RC), WebDriver, and Selenium Grid. A key section compares WebDriver to Selenium RC, noting that WebDriver has a simpler architecture that controls the browser at the OS level, is faster, and allows for more real-life user interaction compared to RC. The document concludes by thanking the reader.
WebDriver is a simpler and more concise programming interface than Selenium RC that better supports dynamic web pages. The key advantages of Selenium 2.0/WebDriver include not requiring a server, having an easier coding experience, and supporting testing of dynamic user interfaces. Selenium 2.0/WebDriver makes direct calls to browsers using their native support for automation, whereas Selenium 1.0 injected JavaScript functions. WebDriver also supports features like drag and drop that Selenium 1.0 did not.
Integrating Selenium testing infrastructure into Scala ProjectKnoldus Inc.
This document provides an overview of test automation using Selenium. It discusses the history and components of Selenium, how to install and use Selenium IDE, and how to record and run test cases. Some key points:
- Selenium was created by Jason Huggins to drive interactions with web pages and automatically rerun tests across browsers.
- Selenium IDE allows recording, editing, and replaying tests in Firefox. It can save tests in various formats.
- Test cases can be recorded by performing actions in the application under test within Selenium IDE. Assertions can then be added to scripts.
- Test suites can be created that include multiple test cases, and the entire suite can be run with one click in Selenium IDE
This document provides an overview of Selenium WebDriver for test automation. It discusses what WebDriver is, its features for controlling browsers, and how it interacts with the Document Object Model (DOM). Locators for finding elements in the DOM are described. An example test task is presented for logging into a web application. The Page Object pattern is introduced as a best practice for organizing WebDriver tests. Code snippets demonstrate low-level WebDriver methods and handling pop-up windows.
The document provides an overview of a Selenium training course, including the following topics:
- Web application testing techniques like functional, usability, and security testing
- Web UI automation tools like Selenium, QTP, and Protractor
- Key Selenium components like WebDriver, Grid, and IDE
- Setting up Selenium environments in Python and other languages
- Locating elements, using waits, and integrating tests with unittest frameworks
Integration Testing With ScalaTest and MongoDBMichal Bigos
This document discusses integration testing with ScalaTest, MongoDB, and Play!. It provides context on integration testing and why it is used. It then describes a testing strategy using ScalaTest for integration tests with MongoDB and Play!. Finally, it details a custom DSL created for integration testing that seeds data from JSON files before tests and allows checking data after tests.
This document discusses Protractor, an end-to-end testing framework for AngularJS applications. It explains what Protractor is, why it is needed for testing AngularJS apps, and how to install and use it. Key points include: Protractor combines Selenium to test AngularJS apps; it allows testing of app functionality rather than just unit tests; installation involves Node.js, Selenium WebDriver, and setting up a configuration file and spec file to define tests. An example test is provided to demonstrate entering text into a field and validating the output.
Selenium was originally developed in 2004 as a JavaScript library to automate web application testing. It has since evolved into a suite of tools including Selenium IDE, Selenium RC, and Selenium WebDriver. These tools can automate tests across different browsers and platforms. Selenium IDE is a simple Firefox plugin for recording and playing back tests without coding. Selenium WebDriver is the successor to Selenium RC and supports multiple programming languages and browsers through browser-specific drivers. It allows tests to be executed programmatically rather than just recorded.
Automation Abstraction Layers: Page Objects and BeyondAlan Richardson
An overview of different approaches to Page Objects and Domain Objects for GUI Automation. Examples use WebDriver and Java.
Full source code is available to download, For more details see the associated blog post.
This document provides an overview of WebDriver and its APIs. WebDriver is a browser automation tool that directly controls the browser using native browser capabilities rather than relying on JavaScript. It has object-oriented APIs for Java, C#, Python, Ruby and supports mobile browsers. The document outlines WebDriver's history and architecture, describes common APIs for controlling the browser, finding elements, and interacting with elements. It also provides examples of implicit and explicit waits, handling popups/alerts, and backward compatibility with Selenium 1.
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...Alan Richardson
This document provides an overview of a half-day tutorial on building abstraction layers for web automation tests using Selenium WebDriver. The tutorial will cover common approaches to modeling web applications and constructing page object and other abstraction layers. Attendees will participate in exercises to experiment with different abstraction techniques using a sample todo list application. The session will discuss topics like page object design, element abstractions, domain objects, and component abstractions. Code examples demonstrating various abstraction implementations will also be presented and analyzed.
UI Testing Best Practices - An Expected JourneyOren Farhi
This slide focus on the good reasons for writing unit tests for testing ui.
Much like you're testing ui manually, you can have simple minimal code doing that for you.
How to configure Appium with android IDE & eclipseHaitham Refaat
To configure Appium with Android IDE and Eclipse, you must:
1. Check your Android version and API level to ensure compatibility.
2. Download and install Android Studio, accepting licenses and selecting installation options.
3. Create a new Android project and fix any Gradle errors.
4. Download and install Appium, starting the server and adding the correct capabilities to match the emulator configuration.
The document discusses software test automation using ScalaTest, a testing framework for Scala. It provides an overview of test automation, describes ScalaTest's traits for defining tests like FeatureSpec, FunSpec, and FlatSpec. It also covers ScalaTest's DSL for writing tests in a readable style, and how to structure test development by starting with pending tests and adding code incrementally.
Step by step - Selenium 3 web-driver - From Scratch Haitham Refaat
The document provides instructions on configuring Eclipse with Maven to develop Selenium WebDriver tests. It describes downloading Java and Eclipse, creating a Maven project in Eclipse, adding Selenium and TestNG dependencies to pom.xml, creating a TestNG class, and modifying the class with sample test code to navigate to a URL and validate the page title.
The document provides information about a weekend workshop on test automation of web applications using Selenium. The workshop will be conducted on June 23rd 2012 by Dipesh Bhatewara and covers topics like why test automation is needed, advantages of test automation, when to automate, approaches to web testing, an introduction to Selenium including its components, installation of Selenium IDE, commonly used Selenium commands, object identification using locators, handling different element types, and an overview of Selenium RC.
Quality Spy is a software testing tool that aims to make testing fun again. It provides features for defining a test strategy, creating test plans with test cases, performing exploratory testing by just starting to test and tracking findings, and lightweight bug tracking. The tool has a user interface for managing test strategies, plans, runs, and exporting bugs to a bug tracker. It is intended to be productive and easy to use so that anyone, not just professional testers, can be a "Quality Spy" and help improve software through testing.
The document discusses redefining test automation by innovating new possibilities. It outlines the evolution of test automation from record and playback methods to newer approaches like keyword-driven and hybrid testing. While test automation tools and expectations have grown, implementations often fail to meet ROI due to challenges like specialized skills requirements, high costs, and maintenance issues. The document introduces TestMagic, a new test automation solution that aims to address these challenges by enabling scriptless automation using techniques like artificial intelligence. It provides case studies of clients who achieved improvements like reduced cycle times and increased coverage with TestMagic. The solution represents an evolution in test automation that simplifies ROI through its innovative approach.
The document outlines the development of atomic structure theories from ancient Greek philosophers like Democritus and Aristotle to modern scientists in the 19th and 20th centuries like Dalton, Rutherford, Bohr, Chadwick and others. Key developments included evidence that atoms are made of even smaller particles like electrons and nuclei, discoveries of subatomic particles like protons and neutrons, and the emerging theories of quantum mechanics. This led to a new understanding of atoms and molecules at the quantum level in terms of electrons, isotopes, nuclear reactions and molecular geometry.
The Tellurium Automated Testing Framework (Tellurium) is a UI module-based automated testing framework for web applications and it is robust, expressive, flexible, and reusable. This is Tellurium 0.6.0 User Guide.
Tellurium 0.7.0 is a major release and we have worked on this release for almost one year. We have closed over 200 issues and have included many interesting new features. To make it easier for people to get familiar with Tellurium, we prepared the reference document to cover almost everything you need to know about Tellurium. The reference document is about 280 pages including 14 chapters and appendices.
This document provides an overview of DbFit, which is a tool for database unit testing. It discusses what DbFit is, its key features for testing databases, how it works by connecting Fit tables to database fixtures, and examples of different DbFit fixtures like Query, Insert, Update, Execute, and ExecuteProcedure. Installation steps are also covered along with using a Wiki to write test scripts.
The document discusses the Electrical and Electronics Engineering (EEE) program. It provides an overview of what EEE is, why study it, eligibility requirements, how students can improve themselves in the program, future career options after graduating with an EEE degree, and why study EEE at a particular college. EEE concerns generating, distributing, and using electrical energy to benefit humanity in a sustainable way. Studying EEE provides access to a wide range of high-demand engineering careers and represents over 25% of all engineering jobs. Eligible students include those with a mathematics background in their higher secondary certificate or related undergraduate degrees.
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyondmguillem
The document is a presentation about WebTest, an open source tool for automated functional web testing. It discusses how WebTest works, how to extend its capabilities using Groovy, common myths about automated web testing, and the tool's future integration with WebDriver. The presentation aims to demonstrate how WebTest can be used to efficiently test web applications.
Selenium RC: Automated Testing of Modern Web Applicationsqooxdoo
This talk is concerned with automated testing of Web applications. It
looks at testing Web apps in general, its goals and challenges; it will
present Selenium and Selenium RC in particular as a testing platform;
and will then focus on adaptions made to Selenium to ease the effort
to test apps made with qooxdoo, a JavaScript framework.
Top100summit 谷歌-scott-improve your automated web application testingdrewz lin
This document discusses improving automated web application testing. It begins with an introduction and agenda. Some key points:
- Testing at Google expects test code quality to match production code quality. Tests must be maintainable and meet engineering standards.
- The present focuses on Selenium/WebDriver automation best practices and things to avoid. Base classes and locator organization can help improve test robustness and maintainability.
- The future may include more exploratory testing tools like WebTestingExplorer for automated exploratory testing.
Overall the document provides guidance on using Selenium/WebDriver for web application testing in a best practices way, focusing on test code quality, maintainability, and anticipating future changes. It emphasizes organizing tests through
This document summarizes jQuery, a JavaScript library, and its features. It discusses jQuery's selector engine, DOM manipulation abilities, and browser compatibility sniffing. It also describes jQuery UI, a plugin library that adds interactive UI elements like drag and drop. The document outlines jQuery's large plugin ecosystem and testing framework. It concludes with information on profiling jQuery applications for performance optimization.
Testing Eclipse GUIs still is an elaborate and extensive task. There are two ways to get the task done: Record-and-play and programming by hand. Test-first programmers usually prefer to program their tests by hand instead of using record-and-play tools, which are typically used by test departments that construct large functional test suites.
When programming UI tests by hand, the programmer is let alone mainly with SWT Robots. While they are great tools to find and use widgets, they naturally can't find their controllers like the the JFace Viewers and the Workbench ViewParts. In test-first development this becomes a problem because the programming level for test and productive code is at a different abstraction level.
Matthias Kempka has found a way to implement a JFace/Workbench Robot. It finds JFace Viewers for SWT elements and eases the testing with views and editors. Declarative UI Elements become accessible for programmed tests. In his talk Matthias Kempka shows how he uses the JFace/Workbench Robot to develop GUI components in Eclipse test-driven and gives an introduction to the key ideas that make the Robot work.
This document discusses automated acceptance testing for ASP.NET applications. It begins with a demonstration of using Selenium WebDriver to automate a Google search. The document then covers topics like the testing pipeline, challenges with real-world testing, focusing tests on solving specific pain points, and designing UI for testability. It emphasizes that UI tests should validate scenarios rather than individual actions and should focus on the most critical tests. The document also discusses tools, techniques, and strategies for testing databases, legacy systems, and more.
The document discusses progressive enhancement with JavaScript and Ajax. It defines progressive enhancement as testing for support of different technologies like JavaScript, DOM, and objects, and providing alternative interfaces when something is not supported. It recommends testing for dependencies before using them, and separating interfaces from styles using CSS for flexibility. While CSS-only solutions seem appealing, JavaScript is more powerful and reliable for building complex, accessible interfaces. The key is enhancing interfaces thoughtfully to improve the user experience, not just for the sake of enhancement.
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...Iakiv Kramarenko
Three simple approaches for implementing web UI automation were discussed: PageObjects, LoadableComponents, and PageUtils. PageObjects use object-oriented inheritance but can become complex. LoadableComponents encapsulate page loading logic but may lead to overcomplicated hierarchies. PageUtils use a procedural approach with functions to represent pages and elements, avoiding complexity while enabling easy tests. Functional programming concepts like higher-order functions can help address lack of DRYness in the procedural approach. The best approach depends on the project needs in terms of teaching others, speed of development, and ability to handle future changes.
George Thiruvathukal, User Experiences with Plone Content Management webcontent2007
The document provides an overview of a presentation on user experiences with the Plone content management system. It includes sections on requirements for the system, a quick tour of Plone's interface, what Plone is, its open source licensing, default content types, publication states, customizing Plone through skins and layers, adding plugins, creating custom content types using Archetypes, and hosting Plone with Apache. Code examples are provided for customizing Plone and defining a custom "ETL Project" content type.
Performance, Games, and Distributed Testing in JavaScriptjeresig
This document discusses various techniques for measuring and optimizing JavaScript performance, including profiling tools in browsers like Firebug and Safari. It also addresses challenges in building multiplayer JavaScript games, such as latency issues, and proposes solutions like combining elements of strategy, intelligence and accuracy. The document concludes by covering distributed and automated testing techniques like TestSwarm that can help address challenges of testing JavaScript across many browsers and platforms.
This is the Google Tech Talk that I gave August 17th, 2007 on building a JavaScript library. I derived much of the talk from my experiences in building the jQuery and FUEL JavaScript libraries.
The document provides 6 ways to keep work from interfering with weekends by testing and monitoring Wicket applications. It recommends using WicketTester for component and Ajax testing without starting the server. It also suggests using PageChecker to validate pages against a policy file, EntityChecker to detect non-serializable objects attached to pages, MarkupValidator to ensure valid HTML, RequestLogger for decoded request information, and monitoring tools like Nagios for uptime and performance of production applications.
This document introduces Selenium, an open source tool for browser-based testing. It discusses how Selenium can be used to automatically test web applications across different browsers and platforms. It also provides examples of using Selenium to write tests in Java and integrating Selenium with other testing frameworks and backends. The document recommends starting with simple tests and keeping markup clean for better testability.
The document discusses frontend architecture and Jest testing. It covers goals of helping the team with architecture decisions, setup tests, and better unit tests. It then covers layers architecture with modules, components, services, and binding. It introduces Jest as a JavaScript testing framework and covers mocks, spies, stubs, and differences from Jasmine. It provides examples of unit testing Angular components in Jest with TestBed and avoiding side effects.
Introduction To Developing Custom Actions Within SharePointGeoff Varosky
This document provides information about custom actions in SharePoint, including definitions, examples, and demonstrations. It begins with an overview of custom actions and what they can be used for. It then discusses the key elements used to define a custom action, such as ID, group, and location. The document demonstrates how to create simple and more complex custom actions, hide custom actions, and use custom action groups. It concludes with references and a Q&A section.
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume LaforgeGuillaume Laforge
This document discusses Groovy and its use in enterprises based on various case studies. It provides an overview of Groovy and Grails, common usage patterns including as a developer tool, for web application development, as an application extension point, and for domain-specific languages. It then describes several case studies where Groovy has been used successfully at companies like LinkedIn, BSkyB, Patterson Institute for Cancer Research, and for applications involving risk calculation, medical data, nuclear safety, and a human resources domain-specific language.
- Testing JavaScript code helps ensure quality and allows for refactoring and code handovers. Unit, integration, and functional testing methodologies were discussed.
- Siesta was introduced as a JavaScript testing tool that supports unit and functional testing for Ext JS and Sencha Touch. It allows simulating user interactions and verifying results.
- Writing testable code through separation of concerns, avoiding direct DOM manipulation, and supporting dependency injection were recommended to facilitate automated testing. Continuous integration was also recommended for running tests regularly.
Ten Man-Years of JavaFX: Real World Project ExperiencesHenrik Olsson
The document discusses the speaker's experiences using JavaFX over 10 man-years for the LoadUI load testing tool. It covers why JavaFX was chosen, how it is used, the difficult migration from JavaFX 1 to 2, pros and cons of JavaFX, examples of JavaFX usage in LoadUI, and the GuavaFX and TestFX tools developed for JavaFX.
The document discusses testing web applications using Selenium. It describes the unique challenges of testing heterogeneous systems with dynamic pages. It then provides an overview of Selenium and how it can be used to simulate user interactions and automate testing of web applications. Specific techniques discussed include using Selenium IDE to record tests and Selenium WebDriver to programmatically control browsers using various programming languages.
Similar to Tellurium.A.New.Approach.For.Web.Testing (20)
Gender Equity in Architecture: Cultural Anthropology in Design IdeologiesAditi Sh.
This PowerPoint presentation offers a comparative analysis between a female and a male architect, focusing on their ideologies, approaches, concepts, and interpretations for a mixed-use building project. This study prompts a reconsideration of architectural inspiration and priorities, advocating for gender equity and cultural anthropology in architectural design.
Portfolio of Family Coat of Arms, devised by Kasyanenko Rostyslav, ENGRostyslav Kasyanenko
The Ukrainian and German journalist Rostyslav Kasyanenko has dedicated himself to genealogical research and heraldry. Originally Ukrainian, now living in Munich (Bavaria) he working in Ukrainian Free University (Est. 1921) as archivist. Curator of Heraldic Teams, Member of Ukrainian Heraldry Society (UHS) R.Kasyanenko is Deviser of the Family and Municipal Coat of Arms and Author of the exhibition concept project: “Maritime flags and arms of the Black Sea countries vs. Mediterranean: what has changed in 175 years?”
Author of scientific articles (2023-24):
Parallels between the meaning of Symbol and Myth according to Hryhorii Skovoroda and heraldic systems
Heraldry as a marker of evolution of national identity in Ukraine and Slovakia: from the Princely era to the "Spring of Nations" (XI-XIX centuries)
Historical parallels in the formation of national awareness in Ukraine and Slovakia in modern times (1848-1992)
Proto-heraldry of Kievan Rus': dynastic symbols of the Princely era, and how does the Palatine Lion relate to this?
Symbols of the House of Romanovyches: the Bavarian influence in Ukrainian heraldry
Participant of Scientific Conferences (2023-24):
- XXХІІІ Heraldic Conference of the Ukrainian Heraldry Society, October 13, 2023, Lviv
- International Conference “Slovak-Ukrainian Relations in the Field of Language, Literature, and Culture in Slovakia and the Central European Space”, University of Prešov, Institute of Ukrainian Studies, Faculty of Arts, 18-20.10.2023
- International Conference „The Past, Present, and Future of Heraldry: Universality and Interdisciplinarity“, Vilnius, 12-13.06.24
- International Conference "Coats of Arms as Weapons – Heraldic Symbols in Political, Dynastic, Military, and Legal Conflicts of the Middle Ages and Early Modern Period”, Alfried Krupp Wissenschaftskolleg Greifswald.
According to the heraldist, he has worked with many heraldic artists over
the years. However, he developed the ideas for all the coats of arms himself, except for his own. The case of the Kasyanenko (from the Shovkoplias clan) family coat of arms — featuring an audacious Cossack riding a rhinoceros — deserves special attention. "After all, one could talk about one's own crest, just like one's ancestors, for an eternity," he says.
This PowerPoint presentation demonstrates my beginner skills in creating product showcases. It provides an overview of a specific product, showing my ability to gather key information and present it clearly. The presentation highlights my efforts to organize content logically and use basic visual aids effectively.
Mastering Web Design: Essential Principles and Techniques for Modern WebsiteswebOdoctor Inc
Dive into the dynamic world of web design with our comprehensive guide that covers everything from foundational principles to advanced techniques. Whether you're a beginner looking to understand the basics or a seasoned designer aiming to refine your skills, this article offers invaluable insights. Explore topics such as responsive design, user experience (UX) optimization, color theory, typography essentials, and the latest trends shaping the digital landscape. Gain practical knowledge and actionable tips to create visually appealing, functional, and user-friendly websites that stand out in today's competitive online environment. Perfect for designers, developers, and anyone passionate about crafting compelling web experiences, this guide equips you with the tools needed to elevate your web design proficiency to new heights.
Right Choice Landscaping offers exceptional villa landscape maintenance servi...rightchoicelandscapi
"Right Choice Landscaping offers exceptional villa landscape maintenance services in Dubai. Our dedicated team ensures that your villa’s outdoor spaces are beautifully maintained, enhancing both the aesthetic appeal and the value of your property. We offer landscaping and Garden design services to commercial property owners and homeowners all over the UAE.
A visual identity is the heart and soul of a place, embodying its unique
character and heritage. By carefully preserving this essence, we can ensure
that new elements blend seamlessly, honoring the past while embracing
the future.
1. Tellurium: A New Approach for Web
Testing
Jian Fang (John.Jian.Fang@gmail.com)
Vivek Mongolu (vivekmongolu@gmail.com)
Matt Senter (matt.senter@gmail.com)
Haroon Rasheed (haroonzone@gmail.com)
Quan Bui (Quan.Bui@gmail.com)
Mikhail Koryak (koryak@gmail.com)
3. What’s Wrong with Selenium
• Take Tellurium project web site as an example.
– The above UI includes one basic search module
and one advanced search module
– Use Selenium IDE and it generates the following
Selenium test case
4. Example Selenium Test case
selenium.open(quot;/p/aost/issues/advsearchquot;);
selenium.select(quot;//div[@id='maincol']/form/table/tbody/tr[1]/td[3]/selectquot;, quot;label=regexp:sAll Issuesquot;);
selenium.type(quot;wordsquot;, quot;Telluriumquot;);
selenium.type(quot;withoutquot;, quot;corequot;);
selenium.click(quot;btnquot;);
selenium.waitForPageToLoad(quot;30000quot;);
...
Assertions
...
selenium.open(quot;/p/aost/issues/advsearchquot;);
selenium.select(quot;canquot;, quot;label=regexp:sAll Issuesquot;);
selenium.type(quot;qquot;, quot;Telluriumquot;);
selenium.click(quot;//input[@value='Search']quot;);
selenium.waitForPageToLoad(quot;30000quot;);
...
Assertions
...
5. What do you observe?
• Verbose
– “Selenium.” everywhere
– Locators everywhere
• Not expressive
– Can you see what the UI looks like?
– Can you tell what the UI element that the locator
is associated with?
• Coupling
– UI locators, actions, and assertions are coupled
together
• Fragile
– Look at the xpath
//div[@id='maincol']/form/table/tbody/tr[1]/td[3]/select
•
– What if the div or the table portions are changed?
•
6. What do you observe? (Cont’d)
• Record and Play
– Need to cover all testing scenarios
– How about data dependency?
– What if the UI is changed?
• Refactor
– Seems to be difficult, especially if you are not the
person who wrote the tests.
• Reusable
– Less likely
• Any way to handle dynamic factors on the web?
– Dynamic data such as data grid and list of options
– Javascript events
7. How about Canoo WebTest
• Canoo WebTest is an Open
Source tool for
automated testing of web
import com.canoo.webtest.WebtestCase
applications
class SimpleTest extends WebtestCase {
• Test cases in XML or
void testWebtestOnGoogle() {
Groovy
webtest(quot;check that WebTest is Google's top 'WebTest' resultquot;)
{
• Use HtmlUnit as testing
invoke quot;http://www.google.comquot;, description: quot;Go to Googlequot;
driving engine
verifyTitle quot;Googlequot;
• Same problems as
Selenium
setInputField name: quot;qquot;, value: quot;WebTestquot;
clickButton quot;I'm Feeling Luckyquot;
Individual UI
–
verifyTitle quot;Canoo WebTestquot;
Not robust
–
}
Not reusable
–
}
Test code couple with UI
–
}
•
8. What Else?
• Twill is a simple language that allows users to browse
the Web from a command-line interface
– open source and written in Python
– use link, forms, cookies, and most standard Web features
– has a simple Python interface
• Disadvantages
Deal with individual UI
–
Need to parse html interactively, not convenient to use
–
Only support Python
–
Simple, not powerful
–
setlocal query quot;twill Pythonquot;
go http://www.google.com/
fv 1 q $query
submit btnI # use the quot;I'm feeling luckyquot; button
show
9. Motivations
Robust to changes
Easy to refactor
Reusable
Expressive
Easy to use
Address dynamic factors
– Dynamic data
– Dynamic web context
– Javascript events
–
Propose: Tellurium Automated Testing Framework
(Tellurium)
11. What is Tellurium?
• Tellurium is a UI module based web testing framework
• Tellurium is built on top of Selenium at the current
stage
– May have our own tellurium test driving engine in
the future
• Tellurium is implemented in Groovy and Java
• Tellurium includes a set of Domain Specific Languages
(DSLs) to define UI, actions, and tests
• Tellurium handles the mapping from Java object to UI
• Tellurium provides you the capability to write tests in
– Java (JUnit 4 or TestNG)
– Groovy
– Pure DSL script
• Tellurium supports Data Driven Testing
14. What Tellurium looks like? (Cont’d)
public void selectIssueType(String type){
selectByLabel quot;issueSearch.issueTypequot;, type
}
public void searchIssue(String issue){
keyType quot;issueSearch.searchBoxquot;, issue
click quot;issueSearch.searchButtonquot;
waitForPageToLoad 30000
}
public void advancedSearchIssue(String issueType, String words, String without){
if(issueType != null){
selectByLabel quot;issueAdvancedSearch.searchTable[1][3]quot;, issueType
}
if(words != null){
keyType quot;issueAdvancedSearch.searchTable[2][3]quot;, words
}
if(without != null){
keyType quot;issueAdvancedSearch.searchTable[3][3]quot;, without
}
click quot;issueAdvancedSearch.searchTable[1][4]quot;
waitForPageToLoad 30000
}
Methods defined for UI modules
15. How challenges are addressed in
Tellurium
• No longer “record and play” style, but UI module
oriented
– defining nested UI objects and methods as a UI module
class, write your own test cases as many as you like
based on the UI module class.
• Decoupling
– UI and tests are separated
– UI is defined in a Groovy UI module class
– Write your own test cases in Java, Groovy, or DSL scripts
• Robust to changes
– Composite locator (UI element attributes) is used to
define UI and the actual xpath will be generated at
runtime, i.e., different attributes -> different runtime
xpath. UI module internal changes are addressed.
– Group locating is used to remove the dependency of the
UI objects from external UI elements, i.e., external UI
changes will not affect the current UI module for most
cases.
16. How challenges are addressed in
Tellurium
• Easy to refactor
– Refactor the individual UI module class
• Reusable
– UI module class could be re-used for the same
application
– Tellurium Widgets can be re-used for different
applications
• Expressive
– UI module is straightforward
– Groovy syntax
– DSLs for actions and tests
• Dynamic factors on web
– UI templates for data grid or List of dynamic data
– “respond” attribute in UI object for Javascript events
– “Option” UI object for multiple possible UI patterns
17. How challenges are addressed in
Tellurium
• Easy to use
– Tellurium provides a configuration file for you to
wire in your own new UI objects/widgets and
customize the framework
– Test can be written in
• Java
• Groovy
• Pure DSL script
– Support JUnit 4 and TestNG
– Reference projects are provided to guide users
on how to use Tellurium
– Support ant and Maven build
• Data Driven Testing
19. Why Tellurium is A NEW Approach?
• Tellurium comes with a set of new concepts that
make Tellurium a different and new approach
for Web Testing
– UI Module
– UID
– Composite Locator
– Group Locating
– UI Template
20. New Concepts: UI Module
Tellurium Automated Testing Framework is UI
module based
– UI module is a collection of UI elements you
group them together
– UI module represents a composite UI object in
the format of nested basic UI elements
– The UI elements inside the composite UI object
have relationship to each other, i.e., logically or
to be on the same subtree on the DOM
– For each UI modules, you need to define a set of
methods to act on the UI
21. New Concepts: UID
Form: “A” “A”
Container: “C” “A.C”
InputBox: “B”
“A.B”
Selector: “D” List: “E”
“A.C.D” “A.C.E”
UrlLink: “1” InputButton: “n”
“A.C.E[1]” A.C.E[n]
Each UI object has a UID and is referenced by cascading UIDs
Elements in List and Table are referenced by indexes
UID makes Tellurium less verbose and more expressive
22. New Concepts: Composite Locator
Composite Locator (clocator): A set of attributes used to define
the object and the actual locator will be derived automatically at
run time. For example,
SubmitButton(uid: quot;googlesearchquot;, clocator: [name: quot;btnGquot;, value: quot;Google Searchquot;])
Which is equal to the following runtime xpath:
/input[@name=”btnG” and @value=”Google Search”]
The class definition is as follows,
class CompositeLocator {
–String header
–String tag
–String text
–String trailer
–def position
–Map<String, String> attributes = [:]
}
Each clocator will generate a run time relative xpath and it
makes Tellurium robust to changes inside UI module.
23. New Concepts: Group Locating
Usually XPath only includes one path to the target node, for example,
“/div/div/form/input”, that is to say, only information along this path is used.
We can use information in the nested object such as the whole form in
Fig (B), i.e., “A Form whose children are input (attributes), selector
(attributes), and input(attributes)”
The composite object has a reference point and once the reference point
is determined, the other UI elements can be located by their relations to
the reference point.
24. New Concepts: UI Template
UI template can be used for
– Unknown number of UI elements, but the types are
known
– Many and similar UI elements
Tellurium List and Table objects use UI templates to define
the UI elements they include inside.
List(uid: quot;subcategoryquot;, clocator: [tag: quot;divquot;, class:quot;sub_cat_sectionquot;]){
TextBox(uid: quot;2quot;, clocator: [tag: quot;divquot;, class: quot;sub_cat_titlequot;])
Container(uid: quot;allquot;, clocator: [tag: quot;pquot;]){
UrlLink(uid: quot;linkquot;, clocator: [:])
}
}
Table(uid: quot;searchTablequot;, clocator: [class: quot;advqueryquot;]){
Selector(uid: quot;row:1, column: 3quot;, clocator: [name: quot;canquot;])
SubmitButton(uid: quot;row:1, column:4quot;, clocator: [value: quot;Searchquot;, name: quot;btnquot;])
InputBox(uid: quot;row:2, column:3quot;, clocator:[name: quot;wordsquot;])
InputBox(uid: quot;row:3, column:3quot;, clocator:[name: quot;withoutquot;])
}
25. Do you need to know Groovy ?
Groovy is a dynamic language for Java
Compatible with Java syntax
–
Object oriented
–
More expressive
–
MetaClass for meta programming
–
Gstring: “label=${target}”
–
Closure
–
Optional type
–
Tellurium Core is implemented in Groovy and your UI
module class must be a Groovy class.
But Test cases can be written in Java, Groovy, or pure DSL
scripts.
You do not really need to know Groovy when use Tellurium
– UI definition is descriptive using DSL
– Methods for UI module can be written in Java syntax
– But using Groovy features will make your code more concise
Groovy IDE support (Eclipse, Netbeans, IntelliJ)
27. UI Object
UI Object includes
– uid: should be unique inside a UI module and the top
level uids should be different for different UI modules.
– namespace: for future extension
– locator: the locator of the UI object, could be
• A base locator (relative xpath)
• A composite locator (object attributes)
– group: this option only applies to a collection type of UI
object such as Container, Table, List, and Form. If
quot;groupquot; attribute to be true, group locating feature will
turn on
– respond: define what JavaScript events the UI object
could respond to.
•UI objects are held on an object registry, which consists of
multiple object trees.
29. Container
Container is an abstract object that can hold a collection of
UI objects.
“group” attribute: Group Locating, sub-tree on the DOM
Container Type Object
– Container
– Form
– List: UI template
– Table: UI template, Data Grid
– Frame: IFrame
– Window: popup window
– Option: multiple UI patterns at run time
30. Widgets
Tellurium provides you the capability to composite UI
objects into a widget object and then you can use the widget
directly just like using a tellurium UI object.
– Reusable
– Name space to avoid name collision
– Compiled as a jar file
– Load from Tellurium configuration file
Tellurium provides an onWidget method
– onWidget(String uid, String method, Object[] args)
• Example: DOJO Date Picker widget
•ui.Form(uid: quot;dropdownquot;, clocator: [:], group: quot;truequot;){
......
•
DOJO_DatePicker(uid: quot;datePickerquot;, clocator: [tag: quot;divquot;, dojoattachpoint:
•
quot;subWidgetContainerNodequot;])
•}
• onWidget quot;dropdown.datePickerquot;, selectPrevYear
31. DSL Context
Domain Specific Language is a small language and can
only live inside its domain context. The DSL context is
the heart of the Tellurium and all UI modules must extend
the DslContext class
Thanks to Groovy’s syntax, all the methods defined in
the DSL context can be written in an expressive way, i.e.,
DSL expression. For example, the following method
defines the DSL: “click id”
• def click(String id){}
DSL context includes UI object definitions, event
actions, and data access.
DslContext is extended to support Data Driving Testing,
which includes input file layout, test definition, and testing
flow.
33. Object-Locator Mapping
Object-Locator Mapping is used to map UI uids
to their runtime locators
– XPath Builder: generate runtime xpath based on
given attributes
– Group Locating: generate runtime xpath for the
reference point if the “group” attribute is true
– Locator Processing: call different locate stragies
based on the locator type of the UI object to
generate relative xpath (call XPath Builder and
Group Locating if apply)
– UI ID mapping: When reference a UI object by UID,
for example, “issueSearch.searchBox”, walk
through individual UI objects, i.e., “issueSearch”
and “searchBox” in this case, and combine the
generated relative xpaths to form the actual runtime
xpath.
Note: UI object can be found by its UID from the object
registry.
34. Event Handler
Event Handler deals with all UI events such as “type”,
“click”, “select”, ...
By default, the event handler will add default events
such as “mouseOver”, “mouseOut”, “focus”, and “blur” to
event actions so that your test code can trigger
Javascript events. You can turn this off in Tellurium
configuration.
Event Handler will look at the UI object’s respond
attribute to include appropriate events for Javascript. For
example,
id: quot;searchboxquot;, clocator: [title: quot;Google Searchquot;], respond: [quot;clickquot;, quot;focusquot;, quot;mouseOverquot;, quot;mouseOu
35. Data Accessor
Data accessor is used to get data or attributes
from web, or check the status/availability of the UI
element. For example,
– getText()
– getValue()
– isElementPresent()
– isChecked()
– waitForElementPresent()
– getXpathCount()
36. Dispatcher
The dispatcher will forward the events from the
event handler and method calls from the data
accessor to the selenium client.
The dispatcher is designed for future extension
so that we can switch to a different UI testing
engine similar to Selenium and keep the upper
layers intact.
38. Tellurium JUnit Test Case
TelluriumJavaTestCase is designed for JUnit 4.4 Test Case
and it supports the following annotations:
@BeforeClass
@AfterClass
@Before
@After
@Test
@Ignore
It comes with predefined @BeforeClass and @AfterClass
methods to set up and tear down the connection to the
Selenium server before tests begin and after all tests are
done, respectively.
39. Tellurium TestNG Test Case
TelluriumTestNGTestCase is similar to
TelluriumJavaTestCase and the difference is that it is for
TestNG
For TestNG, you can use the following annotations:
@BeforeSuite, @AfterSuite
@BeforeTest, @AfterTest
@BeforeGroups, @AfterGroups
@BeforeClass, @AfterClass
@BeforeMethod, @AfterMethod
@DataProvider
@Parameters
@Test
40. Tellurium Groovy Test Case
Tellurium is implemented in Groovy and Java.
You can use Groovy to write your test case as
well.
TelluriumGroovyTestCase is for a single test and
TelluriumSuiteGroovyTestCase is for a test suite.
41. DSL Script
Tellurium supports Domain Specific Language (DSL) for Web
testing and you can even write all your tests in pure DSL
scripts.
Because of the Groovy Syntax, each method in the DslContext
can be written using DSL syntax. For example,
mouseOver(String id) -> mouseOver id
DSLs to support Tellurium tests:
– openUrl url
– connectUrl url
– assertEquals expected, actual
• Tellurium supports pure dsl tests. The dsl script is actually a
Groovy class and it will be executed by DslScriptExecutor
– rundsl.sh
– rundsl.bat
42. Tellurium Configuration
Tellurium comes with a global configuration file,
TelluriumConfig.groovy, which sits in the project root
directory and you can change all the settings in this file. If
this file is missing, the framework will use the default settings
specified in Groovy classes.
The configure file makes it very easy for users to customize
Tellurium.
The configuration file includes the following sections:
Embedded Server
–
Event Handler
–
Data Accessor
–
Connector
–
Data Driven
–
Test
–
UI Object
–
Widget
–
43. Data Driven Testing
Data Driven Testing is a different
way to write tests
– separate test data from the test
scripts
– the test flow is controlled by the
input file.
Data Provider
loadData()
–
bind()
–
cacheVariable()
–
– getCachedVariable()
TelluriumDataDrivenModule
– UI Module, FieldSet, Tests
TelluriumDataDrivenTest
– includeModule()
– stepToEnd()
44. Tellurium Tools
Tellurium sub-project TrUMP creates a Firefox plugin to
automatically generate UI modules for users.
The user just needs to click on the UI elements on the
web and UI modules will be automatically generated to
include all the selected UI elements.
The plugin only generates the UI modules, not the test
itself, which is the difference between TrUMP and
Selenium IDE. You need to define methods for the UI
modules and then write test cases based on the UI
modules.
For the time being, you need to use other tools to check
the runtime html and create UI module manually. The
useful tools include:
– DOM Inspector
– Xpather
– Firebug
45. Tellurium Projects
Tellurium Engine: Similar to Selenium
•
Core and will be Tellurium test
driving engine. More efficient and
supports nested UI object.
JUnit TestNG
Reference Project Reference Project
Tellurium Core: UI objects, locator
•
mapping, and test support.
Tellurium widget: DOJO widget
•
Tellurium Widget extension
Tellurium Reference Projects: JUnit 4
•
and TestNG projects to demonstrate
how to create real world Tellurium
Tellurium Core test cases using Tellurium project
TrUMP web site as a reference.
TrUMP: Firefox Plugin to automatically
•
generate UI modules
Tellurium Engine
Tellurium projects support ant and Maven
build
Tellurium currently supports Groovy 1.6.0
and Selenium RC 1.0
46. Tellurium UI Model Plugin (TrUMP)
• TrUMP IDE is a Firefox
plugin to automatically
create UI modules for
users
• Download TrUMP xpi file
from Tellurium project
site to install it
• Different xpi files for Firefox
3 and Firefox 2.
• They are the same except
the way to show the view
is different
• Logging and preference
support
47. TrUMP: How it works
Array
UI Module
Web page
User Clicks
1 Validate
Generate
2
Validator
Customize
Validate
3
Internal Tree
48. TrUMP: Recording
• Click on any element you want to choose
• Click one more time to unselect
• Click on the selected element and TrUMP will show you where it is
on the web
49. TrUMP: Generate
• The “Generate” button will generate an internal tree first
• Then TrUMP generates the default UI module
– Selected attributes from a White list
– Event handlers are converted to the respond attribute
– Group option is off by default
50. TrUMP: Customize
• Group option is available to check
• Optional attributes are available to select
– Position, header, and may others
51. TrUMP: How to Customize
You can change UIDs and UI types
•
Select or remove attributes
•
Turn on group option
•
TrUMP automatically validates the UI module, make sure you do
•
not see any red “X” mark, or you do not care or act directly on
the UI elements with red “X” mark
• Avoid attributes that may change such as position and header
52. TrUMP: Export UI Module
package tellurium.ui
import org.tellurium.dsl.DslContext
/**
* This UI module file is automatically generated by TrUMP 0.1.0.
*
*/
class NewUiModule extends DslContext{
public void defineUi() {
ui.Container(uid: quot;Telluriumquot;, clocator: [tag: quot;bodyquot;, class: quot;t2quot;]){
Form(uid: quot;Formquot;, clocator: [tag: quot;formquot;, method: quot;getquot;, action: quot;listquot;], group: quot;truequot;){
Selector(uid: quot;DownloadTypequot;, clocator: [tag: quot;selectquot;, name: quot;canquot;, id: quot;canquot;])
InputBox(uid: quot;SearchBoxquot;, clocator: [tag: quot;inputquot;, type: quot;textquot;, name: quot;qquot;, id: quot;qquot;])
SubmitButton(uid: quot;Searchquot;, clocator: [tag: quot;inputquot;, type: quot;submitquot;, value: quot;Searchquot;])
}
Container(uid: quot;Titlequot;, clocator: [tag: quot;tablequot;, id: quot;mtquot;]){
UrlLink(uid: quot;Issuesquot;, clocator: [tag: quot;aquot;, text: quot;Issuesquot;], respond: [quot;clickquot;])
UrlLink(uid: quot;Wikiquot;, clocator: [tag: quot;aquot;, text: quot;Wikiquot;], respond: [quot;clickquot;])
UrlLink(uid: quot;Downloadsquot;, clocator: [tag: quot;aquot;, text: quot;Downloadsquot;], respond: [quot;clickquot;])
}
}
}
//Add your methods here
}
• Export UI module to a groovy file with everything setting up for
you
• You only need to fill up your methods to act on the UI based on
your application
• Create JUnit or TestNG Java test cases based on the UI module
54. How to use Tellurium?
Use Tellurium jar and configuration file
Maven
Use Reference Project as Manually create Project
Maven Archetype
a base
Trump Create UI modules
Groovy Class extends DslContext
Create methods for UI modules
JUnit/TestNG Create Test Cases In Java, Groovy, or DSL
Run Tests
55. Examples: Google Start Page
Create UI Module
– Manual process now to look the runtime html
– HTML Tool: DOM Inspector, XPather, Firebug
– Tellurium Firefox Plug-in (TrUMP)
class NewGoogleStartPage extends DslContext{
public void defineUi() {
ui.Container(uid: quot;google_start_pagequot;, clocator: [tag: quot;tdquot;], group: quot;truequot;){
InputBox(uid: quot;searchboxquot;, clocator: [title: quot;Google Searchquot;])
SubmitButton(uid: quot;googlesearchquot;, clocator: [name: quot;btnGquot;, value: quot;Google Searchquot;])
SubmitButton(uid: quot;Imfeelingluckyquot;, clocator: [value: quot;I'm Feeling Luckyquot;])
}
}
def doGoogleSearch(String input){
type quot;searchboxquot;, input
pause 500
click quot;googlesearchquot;
waitForPageToLoad 30000
}
def doImFeelingLucky(String input){
type quot;searchboxquot;, input
pause 500
click quot;Imfeelingluckyquot;
waitForPageToLoad 30000
}
}
56. Examples: Google Start Page
(Cont’d)
Create JUnit test case
public class GoogleStartPageJavaTestCase extends TelluriumJavaTestCase {
protected static NewGoogleStartPage ngsp;
@BeforeClass
public static void initUi() {
ngsp = new NewGoogleStartPage();
ngsp.defineUi();
}
@Test
public void testGoogleSearch(){
connectUrl(quot;http://www.google.comquot;);
ngsp.doGoogleSearch(quot;tellurium selenium Groovy Testquot;);
}
@Test
public void testGoogleSearchFeelingLucky(){
connectUrl(quot;http://www.google.comquot;);
ngsp.doImFeelingLucky(quot;tellurium selenium DSL Testingquot;);
}
}
59. Future Directions
Implement Locator Query Language (LQL) using
JQuery in Tellurium Core and Tellurium Engine.
Add UI template support for the TrUMP project.
Complete the DOJO widget project to add more
DOJO widgets.
Prototype Tellurium Engine project as Tellurium
test driving engine to support nested UI objects
and LQL.