Project

General

Profile

Actions

task #7356

open

setup selenium test suite for cdm-vaadin

Added by Andreas Kohlbecker about 6 years ago. Updated about 3 years ago.

Status:
In Progress
Priority:
Priority14
Category:
cdm-vaadin
Target version:
Start date:
Due date:
% Done:

20%

Estimated time:
Severity:
normal

Description

The primary option to setup a test suite for testing the cdm-vaadin UIs is to use the Vaadin Test Bench. Even if this product is open source (https://github.com/vaadin/testbench) it is a commercial product and purchasing a proper license seems required for using it even if the test bench can be compiled from source.

The major benefits of the Vaadin Test Bench over plain selenium seems to be:

  1. integrates application startup
  2. can run on a hub or parallelized -
  3. has "intelligent" wait() functionality "In pure Selenium, you need to use the wait methods explicitly, and know what to use and when. Vaadin TestBench works together with the client-side engine of Vaadin framework to immediately detect when the rendering is finished. Waiting is implicit, so you do not normally need to insert any wait commands yourself." (Book of Vaadin chapter 23.8.1. Waiting for Vaadin). This functionality is provided by the com.vaadin.testbench.commands.TestBenchCommandExecutor.waitForVaadin(). The waitForVaadin method is automatically called when specific WebDriver methods are invoked. The DriverInvocationHandler cares for this.
  4. Selenium Element for each of the Vaadin UI components

Options to replace the Vaadin Test Bench magic by own developments (number in the list correspond to the numbers above)

  1. starting of jetty before maven integration test and to stop it afterwards is quite easy to setup
  2. no need to do this in the test framework itself. Jenkins provides much better means to do that.
  3. The intelligent wait could be easily replaced by an own implementation
  4. not urgently needed

More details on the vaadin TestBench can be found in the master thesis for which the TestBench has been developed: rogozin.pdf

An alternative is to use selenium directly on the vaadin ui as demonstrated by the selenide project demo, Selenide by the way is an alternative to Selenium which promises to be simpler to use. Selenide code is at github:codeborne/selenide

More on selenide/vaadin:

Setting up test web application context with spring boot:

https://blog.ccbill.com/spring-boot-and-context-handling

Testdata

Testadata management either per DbUnit or spring-test:

spring-test

https://stackoverflow.com/questions/34617152/how-to-re-create-database-before-each-test-in-spring#37246354

e.g.:

@Transactional(value=JpaConfiguration.TRANSACTION_MANAGER_NAME)
@Sql(executionPhase=ExecutionPhase.BEFORE_TEST_METHOD,scripts="classpath:/test-sql/group2.sql")
public class GroupServiceTest extends TimeoffApplicationTests {

Related projects and frameworks:

General considerations on tests


Files

rogozin.pdf (1.1 MB) rogozin.pdf Andreas Kohlbecker, 02/26/2019 01:40 PM
Actions #1

Updated by Andreas Kohlbecker about 6 years ago

  • Description updated (diff)
Actions #2

Updated by Andreas Kohlbecker about 6 years ago

  • Description updated (diff)
Actions #3

Updated by Andreas Kohlbecker about 6 years ago

  • Description updated (diff)
Actions #4

Updated by Andreas Kohlbecker about 6 years ago

  • Description updated (diff)
Actions #5

Updated by Andreas Kohlbecker about 6 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • % Done changed from 0 to 10
Actions #6

Updated by Andreas Kohlbecker about 6 years ago

  • Tags changed from phycobank to phycobank, test, selenium
Actions #7

Updated by Andreas Kohlbecker about 6 years ago

  • Description updated (diff)
Actions #8

Updated by Andreas Kohlbecker about 6 years ago

  • Description updated (diff)
Actions #9

Updated by Andreas Kohlbecker about 6 years ago

  • Description updated (diff)
Actions #10

Updated by Andreas Kohlbecker over 5 years ago

  • Target version changed from Vaadin Taxon Concept Editor to Reviewed Next Major Release
Actions #11

Updated by Andreas Kohlbecker over 5 years ago

  • Priority changed from New to Highest
  • Target version changed from Reviewed Next Major Release to Release 5.6
Actions #12

Updated by Andreas Kohlbecker over 5 years ago

  • Description updated (diff)
Actions #13

Updated by Andreas Kohlbecker over 5 years ago

  • Description updated (diff)
Actions #14

Updated by Andreas Kohlbecker over 5 years ago

  • Description updated (diff)
Actions #15

Updated by Andreas Kohlbecker over 5 years ago

  • Description updated (diff)
Actions #16

Updated by Andreas Kohlbecker over 5 years ago

Adding master thesis on Vaadin TestBench

Actions #17

Updated by Andreas Kohlbecker over 5 years ago

  • Description updated (diff)
Actions #18

Updated by Andreas Kohlbecker over 5 years ago

  • Description updated (diff)
Actions #19

Updated by Andreas Kohlbecker over 5 years ago

  • Description updated (diff)
Actions #20

Updated by Andreas Kohlbecker over 5 years ago

  • % Done changed from 10 to 20
Actions #21

Updated by Andreas Kohlbecker over 5 years ago

  • Description updated (diff)
Actions #22

Updated by Andreas Kohlbecker over 5 years ago

  • Priority changed from Highest to Priority14
Actions #23

Updated by Andreas Kohlbecker over 5 years ago

  • Target version changed from Release 5.6 to Release 5.7
Actions #24

Updated by Andreas Kohlbecker about 5 years ago

  • Target version changed from Release 5.7 to Release 5.8
Actions #25

Updated by Andreas Kohlbecker almost 5 years ago

  • Target version changed from Release 5.8 to Release 5.10
Actions #26

Updated by Andreas Kohlbecker almost 5 years ago

  • Target version changed from Release 5.10 to Release 5.11
Actions #27

Updated by Andreas Kohlbecker over 4 years ago

  • Target version changed from Release 5.11 to Release 5.12
Actions #28

Updated by Andreas Kohlbecker over 4 years ago

  • Target version changed from Release 5.12 to Release 5.13
Actions #29

Updated by Andreas Kohlbecker over 4 years ago

  • Target version changed from Release 5.13 to Release 5.14
Actions #30

Updated by Andreas Müller over 4 years ago

  • Target version changed from Release 5.14 to Release 5.15
Actions #31

Updated by Andreas Kohlbecker about 4 years ago

  • Target version changed from Release 5.15 to Release 5.18
Actions #32

Updated by Andreas Kohlbecker over 3 years ago

  • Target version changed from Release 5.18 to Release 5.19
Actions #33

Updated by Andreas Kohlbecker over 3 years ago

  • Target version changed from Release 5.19 to Release 5.21
Actions #34

Updated by Andreas Kohlbecker over 3 years ago

  • Target version changed from Release 5.21 to Release 5.22
Actions #35

Updated by Andreas Kohlbecker about 3 years ago

  • Target version changed from Release 5.22 to Release 5.51
Actions

Also available in: Atom PDF