Code Monkey home page Code Monkey logo

comparisons's Introduction

This project is a Java framework and library for automated testing. It provides functionality to enable testing of web-based applications (using selenium ), GNOME apps (using LDTP), and console applications.

TestNG is used as the test harness. There are several plugins available here for TestNG to facilitate logging, screenshots, and interactions with Bugzilla and TCMS.

Features include

  • An extended selenium client that has some higher-level methods and includes more detailed logging (see com.redhat.qe.auto.selenium.ExtendedSelenium). Also provides some API to create complex XPath locators.
  • An extension of TestNG's Assert class that does better logging and adds a bit more API. See com.redhat.qe.auto.testng.Assert.
  • Extensions to Trilead's SSH2 java library (under com.redhat.qe.tools package)
  • Integration with Bugzilla (Tests can be skipped if a known bug that blocks the test is still open)
  • Running tests under Hudson
  • Use of ReportNG to generate pretty html reports with icons for assertions, and actions.

FAQ:

  1. How do I run tests under hudson?

    We use leiningen to build our automation, which will include webui-framework as a dependency. Then it's just a simple Bash build step that calls java:

    java -cp lein classpath org.testng.TestNG [options] [suitefile]

  2. How do I get pretty reports in Hudson?

    Specify the Reportng html listener as a testng option on the command line (can also be added to the suite file):

    -listener org.uncommons.reportng.HTMLReporter

    In your java logging settings (default settings location is ~/log.properties), add

    com.redhat.qe.auto.testng.TestNGReportHandler

    to the list of handlers.

    Several java system properties may need to be set (this can be done on the command line or via properties file whose default location is ~/automation.properties):

    testng.outputdir=[any relative path within the workspace - must be on the list of dirs to archive for the hudson job, defaults to the dir where the jvm is invoked (same as user.dir system property] org.uncommons.reportng.escape-output=false org.uncommons.reportng.stylesheet=web/reportng-custom.css

    (For jobs that can take screenshots, currently only selenium):

    selenium.screenshot.dir=[any subdir of the outputdir]
    selenium.screenshot.link.path=../artifact/[screenshotdir]

    Install the HTML Reports plugin for hudson. In the Post-build actions for your hudson job, point the "Publish HTML Reports" section to the [outputdir]/html/index.html file that will be produced by the TestNG report.

    The report will use icons that need to be served by the hudson web server. Create a subdir images/webui-framework under the 'war' dir (for standalone hudson - for tomcat, create it under 'webapps'). Copy the files resources/web/*.png from this repository, into the subdirectory you created. Then the report's icons will link to the correct files.

  3. How do I use kerberos negotiate auth (with services like TCMS)? First you'll need to get a kerberos ticket with kinit. Then you'll need the following jvm arguments when running your tests:

    -Duser.krb5cc=[your-kerb-cache-file] -Djavax.security.auth.useSubjectCredsOnly=false

    Your cache file is something like /tmp/krb5cc_500. The number at the end is your unix userid, check your /tmp dir for files like this - the one owned by you should be the one you want.

comparisons's People

Contributors

bcrochet avatar jsefler avatar weshayutin avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.