Code Monkey home page Code Monkey logo

testbench's Introduction

Published on vaadin.com/directory

Gitter

Vaadin TestBench

Vaadin TestBench is both a unit testing tool and an integration testing tool.

The unit testing tool does not rely on a browser, so its tests run very fast. Because these tests do not run a browser, the browser's Javascript is not available.

The integration testing tool is built on Selenium and is used for automated user interface testing of web applications on multiple platforms and browsers.

Choosing testing tools optimized for Vaadin UI testing and supported by Vaadin provides you with the best integration and upward compatibility with the Vaadin framework.

Releases

Official releases of this add-on are available at https://vaadin.com/directory/component/vaadin-testbench.

Building TestBench

git clone https://github.com/vaadin/testbench.git
cd testbench
mvn clean install

Running Unit Tests

mvn test

Running Integration Tests

JUnit 4 tests should extend ParallelTest if they are to be run in multiple browser configurations. For each browser configuration, a WebDriver is properly created with the desired browser configuration.

Locally

An application server must be running in order to run the integration tests. The following examples use Jetty for that purpose.

Maven

The Maven project is configured to automatically start and stop Jetty when you run the integration tests.

    cd vaadin-testbench-integration-tests
    mvn -P validation verify
    cd vaadin-testbench-integration-tests-junit5
    mvn -P validation verify

If instead of running the tests with all the configured browsers you want to run with only one headless Chrome browser and limit the parallelism to 8, use

    cd vaadin-testbench-integration-tests
    mvn -P validation verify -Dcom.vaadin.testbench.Parameters.runLocally=chrome -Dcom.vaadin.testbench.Parameters.headless=true -Dcom.vaadin.testbench.Parameters.testsInParallel=8
    cd vaadin-testbench-integration-tests-junit5
    mvn -P validation verify -Dcom.vaadin.testbench.Parameters.runLocally=chrome -Dcom.vaadin.testbench.Parameters.headless=true -Dcom.vaadin.testbench.Parameters.testsInParallel=8

IntelliJ IDEA

Alternately, you can manually run Jetty (and leave it running) and then individually run integration tests or groups of integration tests within your IDE.

To run Jetty, you can either do it from the command line

    cd vaadin-testbench-integration-tests
    mvn jetty:run

(Jetty will continue to run. When you want to stop it, press Ctrl-C on the command line where Jetty is running.)

or you can create and run a Maven "Run/Debug Configuration" with jetty:run as the goal.

By default, all the configured browsers with a parallelism of 50 will run when you run your integration tests. If instead you want to run with only one headless Chrome browser and limit the parallelism to 8, edit the configuration template for JUnit and set its "VM options" to

-ea -Dcom.vaadin.testbench.Parameters.runLocally=chrome -Dcom.vaadin.testbench.Parameters.headless=true -Dcom.vaadin.testbench.Parameters.testsInParallel=8

JUnit Configuration Template

Now when you run integration tests in the IDE, it will use the template defaults.

As this template change is global to all your projects, remember to restore the JUnit configuration template "VM options" when you no longer need them.

Remotely

Because integration tests can take a long time to run as each test launches the application in multiple browsers, you can configure your tests to run in Sauce Labs. See details at SauceLabs and GitHub.

Issue tracking & Contributions

Please report bugs and submit feature requests as GitHub issues. Contributions in the form of pull requests are more than welcome.

License

This add-on is distributed under Vaadin Commercial License and Service Terms.

testbench's People

Contributors

ahie avatar alvarezguille avatar anthonyvaadin avatar artur- avatar caalador avatar czp13 avatar dependabot[bot] avatar diegocardoso avatar fluorumlabs avatar jarski avatar joelpop avatar johannesh2 avatar johndevs avatar jouni avatar magi42 avatar manolo avatar marcinvaadin avatar mcollovati avatar mshabarov avatar mstahv avatar nikove avatar oluwasayo avatar rogozinds avatar sissbruecker avatar svenruppert avatar tatulund avatar thevaadinman avatar vaadin-bot avatar zch avatar zhesun88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

testbench's Issues

TestingTools: modify controlpanel

Originally by @mstahv


  • add message and add comment combined
  • ATF-> TT logo,
  • logosta linkki TT serveriin , serverin avaus nappi veks
  • clear test case nappi pois
  • test report nappi pois
  • alavetovalikko pois
  • minimize nappi toimimaan
  • pause pauses both record and playback, combine with record and playback
  • [x ] make pause work with playback mode
  • possibly add step for playback mode

ATF Server: task scheduler GUI

Originally by Jani Laakso


ATF Server task scheduler GUI

Note

  • AUT Server means Application Under Test Server, e.g. -removed- or -removed-
  • AUT Client means Applicaiton Under Test Client, e.g. Windows test host X

Task scheduler allows tester to run testcases/suites automatically against specific AUT Server and AUT Client. Tasks may be reoccurring meaning they are executed once per day or they can be executed only once on a specific date and time.

Proposed components

Table "Tasks"

  • list of all scheduled tasks
  • columns are
  • name (String)
  • description (String)
  • enabled (boolean)
  • once execution time (Date)
  • reoccurring execution time (hour:minute)
  • AUT Server (URL)
  • AUT Client (IP)

Table "Selected task"

  • list of selected task's testcases and testsuites
  • columns are
  • execution order (integer, starts from 1)
  • testcase/suite

Table "Available testcases/suites" columns are

  • list of all testcases/suites that can be added to "Selected task" table
  • columns are
  • testcase/suite

Proposed layout and controls

Add new tab called "Task scheduler" to main page's first tabsheet.

For "Task scheduler" add following components

Add "Tasks" table

  • "Tasks" columns should be editable using Calendar and Label components

Add "Selected task" table

  • "Move selected testcase/suite up (execute earlier)" button
  • "Move selected testcase/suite down (execute later)" button

Add "Available testcases/suites" table

  • "Add selected testcase/suite to "Selected task" table" button
  • "Remove selected testcase/suite from "Selected task" table" button

Imported from https://dev.vaadin.com/ issue #869

ATF: packaging and howtos

Originally by Jani Laakso


Check that current packaging is fine with first customer case (-removed- -removed-).

Add basic documentation for

  • howto deploy ATF Server WAR, configure Toolkit applications (web.xml)
  • howto setup AUT host environments
  • test recording
  • test playback (manually)
  • scheduling automated test playbacks
  • browsing test results and their contents (raports)

Imported from https://dev.vaadin.com/ issue #862

Simplify TT main view: leave out result details-panel

Originally by @samie


Based on principle "Simplicity over features":

Simplify the main veiw and leave out the result details panel as described in
http://toolkit.intra.itmill.com/trac/itmilltoolkit/attachment/ticket/1258/Screenshot%20-%2010.1.2008%20%2C%2015_03_05.jpg

All information relevant to tester should be mainly visible in results-list.
Additional information (i.e. details) could open in separate popup or in html-format
into separate window.

Currently details-panel is visually confusing and selection in results-list does not bring any new information to user (extra click only).


Imported from https://dev.vaadin.com/ issue #1291

ATF database timestamps

Originally by Jukka Viitala


All timestamp fields in database record date correctly, but the time portion is allways zeros. Only this makes times go ok in hsqldb: TIMESTAMP DEFAULT CURRENT_TIMESTAMP


Imported from https://dev.vaadin.com/ issue #877

ATF: feature robustness test

Originally by Jani Laakso


For first customer deliverable (-removed- -removed-), ensure that "typical" use cases may be tested succesfully.

Please write new tickets for the UI components that do not work. We'll gather these are limitations within product documentation..

Also, ATF should work in a robust way. Browsers do not hang or get into situation where they need to be killed, ATF Server always receives test results.


Imported from https://dev.vaadin.com/ issue #864

Sprint #1 Usability

Originally by @emarc


Sprint 1 (#1250) Simplicity over features!

Mockup should be done by 10.1 afternoon, specific tasks after that. done

Some notes:

  • Server: results (and possibly test cases) should be sorted latest first done
  • ~~ Player/Recorder: simplify, remove unnecessary buttons~~ done
  • ~~ Player: stop() should produce "Click play to continue" or blinking play-button ~~
  • ~~Server: test case "URL" -> "URL (run test)" ~~
  • ~~ Server: Record TestCase (-> enter url -> (default: restart app) -> record ), + Create empty TestCase ~~ done
  • ~~ Server: login screen, any user/pwd accepted for first user, any user kan create new users (optional: "keep me logged in...") ~~ done
  • ~~ Server: help -link (to manual.pdf in war) ~~
  • ~~ Server: results-table should have failed/passed icons ~~ done (style instead)
  • ~~ Server: results table could have NEW indicator: user.lastlogin < result.date ~~ done

ATF Control Panel: minimize, resume buttons

Originally by Jani Laakso


While doing recordings it's required that user may minimize or even hide ATF Control Panel.

In it's minimized form it should consume as little space as possible but still

  • on recording, provide feedback on any recorded user event, so user sees that recording works appropriately
  • on playback, provide e.g. 3 lines of textarea for displaying playback messages

Imported from https://dev.vaadin.com/ issue #858

Test and tune all components to work with Testing Tools

Originally by @mstahv


Compatibility matrix is in Google Docs use this invitation to edit/see.

For TK4 no matrix exists, but status with compons is pretty much the same. (Drag'n'Drop's and scrolling bugs)

TODO

  • ~~ make~~ fill component matrix to make sure testing then all throughout
  • ~~ tune ~~ either TT or components to make all possible components work with TT
  • document those that still does not (like rich text editor)

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.