You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/compatibility.adoc
+11-15Lines changed: 11 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,7 @@ order: 901
7
7
8
8
= List of Supported Technologies
9
9
10
-
This page shows the minimum required versions of supported technologies for *Vaadin 24*. See the http://github.com/vaadin/platform/releases/tag/24.0.0[release notes] for more details.
11
-
12
-
pass:[<!-- vale Vaadin.Abbr = NO -->]
10
+
This page shows the minimum required versions of supported technologies for Vaadin 24. See the http://github.com/vaadin/platform/releases/tag/24.0.0[release notes] for more details.
13
11
14
12
[cols="1,1"]
15
13
|===
@@ -21,16 +19,16 @@ pass:[<!-- vale Vaadin.Abbr = NO -->]
21
19
| Maven| 3.5 or later (except for 3.8.2 and 3.8.3)
Copy file name to clipboardExpand all lines: articles/components/charts/migrating-from-earlier-versions.asciidoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ See the <<css-styling#,CSS Styling guide>> for detailed instructions.
74
74
75
75
=== Running Charts 9 in Vaadin 14
76
76
77
-
Although Charts 9 was released in a later Vaadin version, you can use it in a Vaadin 14 project in *npm mode* by overriding the version number in the `pom.xml` file:
77
+
Although Charts 9 was released in a later Vaadin version, you can use it in a Vaadin 14 project in *npm mode* by overriding the version number in the [filename]`pom.xml` file:
Copy file name to clipboardExpand all lines: articles/styling/advanced/multi-app-themes.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ An <<../application-theme#, application theme>> can be used in multiple applicat
22
22
└── pom.xml
23
23
----
24
24
25
-
2: Update `pom.xml` as follows:
25
+
2: Update [filename]`pom.xml` as follows:
26
26
27
27
. Configure the theme library's identifiers and packaging format.
28
28
. Configure the Vaadin platform version.
@@ -98,7 +98,7 @@ See Vaadin's <<{articles}/integrations/spring/configuration#special-configuratio
98
98
99
99
4: Create the JAR file by running the command `mvn install` in the project root folder. The file will be generated in the `target` sub-folder.
100
100
101
-
To use the packaged theme in an application, add the JAR as a dependency in the application project's `pom.xml`, and apply the theme either using the <<../application-theme#applying-a-theme, @Theme annotation>>, or in `theme.json` as a <<parent-and-sub-themes#, parent-theme>> to the application's own theme.
101
+
To use the packaged theme in an application, add the JAR as a dependency in the application project's [filename]`pom.xml`, and apply the theme either using the <<../application-theme#applying-a-theme, @Theme annotation>>, or in `theme.json` as a <<parent-and-sub-themes#, parent-theme>> to the application's own theme.
Copy file name to clipboardExpand all lines: articles/testing/end-to-end/advanced-concepts.adoc
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,17 @@
1
1
---
2
-
title: Advanced Testing Methods
2
+
title: Advanced Testing Methods
3
+
description: Describes advanced methods for testing a project.
3
4
order: 80
4
5
---
5
6
7
+
6
8
= Advanced Testing Methods
7
9
8
10
There are a few advanced testing methods you may want to consider: waiting for Vaadin; waiting until a particular condition is met; scrolling; profiling test execution time; and running tests in parallel.
9
11
10
12
These testing methods aren't typically needed. For example, situations in which you might need to disable automatic waiting or scrolling in a view are rare. In such cases, you've probably encountered a bug in the software. Nevertheless, these testing methods are explained here for when they are needed.
11
13
14
+
12
15
== Waiting for Vaadin
13
16
14
17
Web pages are typically loaded and rendered immediately by the browser. In such applications, you can test the page elements immediately after the page is loaded. In Vaadin and other Single-Page Applications (SPAs), rendering is done by JavaScript code, asynchronously. Therefore, you need to wait until the server has given its response to an AJAX request and the JavaScript code finishes rendering the UI.
You can re-enable waiting in the same interface with [methodname]`enableWaitForVaadin()`.
34
37
35
38
36
-
== Waiting Until a Condition is Met
39
+
== Waiting for Condition's Met
37
40
38
41
In addition to waiting for Vaadin, it's also possible to wait until a condition is met. For example, you might want to wait until an element is visible on the web page. That might be done like so:
39
42
@@ -65,7 +68,6 @@ Furthermore, in Vaadin applications there are two sides which need to be profile
65
68
The `TestBenchCommands` interface offers the following methods for profiling test execution time:
66
69
67
70
[methodname]`totalTimeSpentServicingRequests()`:: This returns the total time in milliseconds spent servicing requests in the application on the server side. The timer starts when you first navigate to the application and hence start a new session. The time passes only when servicing requests for the particular session.
68
-
69
71
+
70
72
If you're also interested in the client-side performance for the last request, you must call [methodname]`timeSpentRenderingLastRequest()` before calling this method. It's necessary because this method makes an extra server request, which causes an empty response to be rendered.
71
73
@@ -83,7 +85,6 @@ If you also call [methodname]`timeSpentServicingLastRequest()` or [methodname]`t
83
85
84
86
The following example is given in the `link:http://github.com/vaadin/testbench-demo/blob/master/src/test/java/com/vaadin/testbenchexample/VerifyExecutionTimeITCase.java[VerifyExecutionTimeITCase.java]` file in the TestBench demo:
85
87
86
-
87
88
[source,java]
88
89
----
89
90
@Test
@@ -128,6 +129,7 @@ public void verifyServerExecutionTime() throws Exception {
128
129
}
129
130
----
130
131
132
+
131
133
== Running Tests in Parallel
132
134
133
135
TestBench supports parallel tests execution using its own test runner (JUnit 4) or native link:http://junit.org/junit5/docs/current/user-guide/#writing-tests-parallel-execution[JUnit 5 parallel execution].
@@ -145,12 +147,14 @@ If your tests don't work in parallel, set the `com.vaadin.testbench.Parameters.t
145
147
146
148
[role="since:com.vaadin:vaadin@V24"]
147
149
150
+
148
151
=== Using Native JUnit 5 Parallel Execution
149
152
150
153
To run tests in parallel, extend the TestBench utility class `BrowserTestBase` or manually annotate test classes with `@Execution(ExecutionMode.CONCURRENT)`.
151
154
152
155
To disable parallel execution, annotate the test class with `@Execution(ExecutionMode.SAME_THREAD)`.
153
156
157
+
154
158
=== Accessing WebDriver and Additional Test Information
155
159
156
160
Using JUnit 5, it is possible to access additional test information in a method annotated with `@Test`, `@BeforeEach`, `@AfterEach`, `@BeforeAll`, or `@AfterAll` by adding the `BrowserTestInfo` method parameter. Here is an example of this:
Copy file name to clipboardExpand all lines: articles/testing/end-to-end/bdd.adoc
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
---
2
2
title: Behavior-Driven Development
3
+
description: A method of developing software starting with writing tests in plain spoken language.
3
4
order: 100
4
5
---
5
6
7
+
6
8
= Behavior-Driven Development
7
9
8
10
Behavior-Driven Development (BDD) is a development methodology based on test-driven development, where development starts from writing tests for the software-to-be. BDD involves using a _ubiquitous language_ to communicate between business goals (i.e., the desired behavior) and tests to ensure that the software fulfills those goals.
@@ -13,15 +15,14 @@ Stories can be expressed as number of _scenarios_ that describe different cases
13
15
14
16
pass:[<!-- vale Vaadin.FirstPerson = NO -->]
15
17
16
-
* _Given_ that I have calculator open,
18
+
- _Given_ that I have calculator open,
17
19
18
-
* _When_ I push calculator buttons,
20
+
- _When_ I push calculator buttons,
19
21
20
-
* _Then_ the display should show the result.
22
+
- _Then_ the display should show the result.
21
23
22
24
pass:[<!-- vale Vaadin.FirstPerson = YES -->]
23
25
24
-
25
26
This kind of formalization is realized in the JBehave BDD framework for Java. The TestBench Demo includes a JBehave example, where the above scenario is written as the link:http://github.com/vaadin/testbench-demo/blob/master/src/test/java/com/vaadin/testbenchexample/bdd/CalculatorSteps.java[following test class]:
0 commit comments