Releases: vividus-framework/vividus
0.2.12 - 2020-12-11
Added
#1212 (Closes #1175) [vividus-plugin-aws-dynamodb] New plugin for Amazon DynamoDB (incubating)
"Incubating" means that the plugin is currently a work-in-progress and may change in the future releases.
New steps to work with Amazon DynamoDB:
When I execute query `$partiqlQuery` against DynamoDB
When I execute query `$partiqlQuery` against DynamoDB and save result as JSON to $scopes variable `$variableName`
Publish Vividus Exporters
Vividus Exporter is an utility enabling publishing of Vividus test execution results to external systems (e.g. test management systems).
vividus-to-xray-exporter
(incubating) exports results to "Xray Test Management for Jira"vividus-to-zephyr-exporter
(incubating) exports results to "Zephyr for Jira - Test Management"
#1135, #1194 (Closes #1104, #1176) [vividus-plugin-web-app] Support mocking of browser HTTP calls
Steps syntax:
When I mock HTTP responses with request URL which $comparisonRule `$url` using response code `$responseCode`, content `$payload` and headers:$headers
When I mock HTTP responses with request URL which $comparisonRule `$url` using response code `$responseCode` and headers:$headers
When I clear proxy mocks
#1135 [vividus-plugin-web-app] Add Vividus expression loading binary resources as bytes
Syntax:
#{loadBinaryResource(*$pathToResource*)}
#1180 [vividus-plugin-mobile-app] Add steps to work with mobile application views
Syntax:
When I switch to native context
When I switch to web view with index `$index`
#1193 [vividus-plugin-mobile-app] Add filter by element attribute
Example:
tagName(android.widget.TextView)->filter.attribute(text=Hi)
#1178 [vividus-plugin-browserstack] Support BrowserStack Local
New property enabling BrowserStack Local
browserstack.browserstack-local.enabled=false
false
by default
Deprecated
#1150 [vividus-plugin-rest-api] Deprecate JSON steps not-following common naming strategy
Deprecated steps:
Then a JSON element by the JSON path '$jsonPath' is equal to '$expectedData'$options
Then a JSON element from '$json' by the JSON path '$jsonPath' is equal to '$expectedData'$options
Then the number of JSON elements by the JSON path '$jsonPath' is $comparisonRule $elementsNumber
When I save a JSON element from '$json' by JSON path '$jsonPath' to $scopes variable '$variableName'
When I set the number of elements found by the JSON path '$jsonPath' to the $scopes variable '$variableName'
When I find $comparisonRule '$elementsNumber' JSON elements by '$jsonPath' and for each element do
Replacements:
Then JSON element by JSON path `$jsonPath` is equal to `$expectedData`$options
Then JSON element from `$json` by JSON path `$jsonPath` is equal to `$expectedData`$options
Then number of JSON elements by JSON path `$jsonPath` is $comparisonRule $elementsNumber
When I save JSON element from `$json` by JSON path `$jsonPath` to $scopes variable `$variableName`
When I set number of elements found by JSON path `$jsonPath` to $scopes variable `$variableName`
When I find $comparisonRule `$elementsNumber` JSON elements by `$jsonPath` and for each element do
Fixed
#1182 (Fixes #1181) Resolve variables as part of names of another variables
Example of the variable using another variable as a part of the name:
${outer${inner}}
#1170 (Fixes #1136) Fix passing of the variable initialized from ExamplesTable to composite steps
Use case:
Composite: When I run composite step with table:$table
When I initialize scenario variable `table-from-composite-step` with values:<table>
Scenario: Pass ExamplesTable as variable to composite step accepting ExamplesTable
When I initialize scenario variable `table` with values:
|column |
|value |
When I run composite step with table:${table}
#1177 (Fixes #1169) [vividus-extension-selenium] Gracefully handle interactions with non-started proxy
Now IllegalStateException: Proxy is not started
error is thrown instead of non-user-friendly NullPointerException
.
#1188 [vividus-plugin-mobile-app] Close keyboard by tapping the latest button
The keyboard is closed in the same way it's done in Appium.
0.2.11 - 2020-11-25
Added
#1156 (Closes #1132) [vividus-plugin-aws-lambda] New plugin for AWS Lambda (incubating)
"Incubating" means that the plugin is currently a work-in-progress and may change in the future releases.
New step to invoke AWS Lambda function:
When I invoke AWS Lambda function `$functionName` with payload `$payload` and save result to $scopes variable `$variableName`
#1146 [vividus] Log system properties at test execution start
#1130 [vividus-http-client] Use system properties while configuring HTTP client
#1137 [vividus-http-client] Support HTTP retry on service unavailability
The new functionality allows to retry HTTP calls with selected status codes for a fixed number of times at a fixed interval.
#1164 [vividus-bdd-engine] Resolve of variables with default value containing a variable reference
Variables can be used in the default part of another variable:
${foo:${bar}}
#1153 (Closes #1149) [vividus-plugin-web-app] Add possibility to override browser proxy host
This features enables using of Browser proxy in the containerized environment.
#1113 [vividus-plugin-mobile-app] Add step selecting item in picker wheel (iOS only)
Syntax:
When I select $direction value with `$offset` offset in picker wheel located `$locator`
#1118 [vividus-plugin-mobile-app] Add step closing mobile application
Syntax:
When I close mobile application
#1165 [vividus-plugin-kafka] [Incubating] Add ability to consume messages from Kafka
New steps:
When I start consuming messages from Kafka topics `$topics`
When I drain consumed Kafka messages to $scopes variable `$variableName`
When I wait with `$timeout` timeout until count of consumed Kafka messages is $comparisonRule `$expectedCount`
When I stop consuming messages from Kafka
#1128 [vividus-plugin-browserstack] Add step capturing network logs
Syntax:
When I save BrowserStack network logs to $scopes variable `$variableName`
Deprecated
#1163 [plugin-aws-s3] Rely on AWS SDK default region provider chain
Deprecated property:
aws.s3.region
Replacement:
system.aws.region
Fixed
#1117 (Fixes #1101) [vividus-allure-adaptor] Handle log messages produced between scenario steps
In case of invalid usage of Vividus expressions some log messages may be produced between regular scenario steps, that caused issues at report generation.
#1151 [vividus-allure-adaptor] Fix handling of successful lifecycle before steps with logging
#1145 (Fixes #1144) [vividus-plugin-web-app] Fix NoUniqueBeanDefinitionException at steps instance creation
#1134 [vividus-plugin-mobile-app] Always search system keyboard from root context
#1133 [vividus-plugin-mobile-app] Swipe up/down with coordiante x=1 to avoid accidental interactions with controls
#1143 [vividus-plugin-mobile-app] Do not try to hide keyboard for XCUIElementTypeTextView element
For iOS
real devices the hide keyboard action works only for XCUIElementTypeTextField
elements and skipped for XCUIElementTypeTextView
elements, in case of XCUIElementTypeTextView
element users should tap outside the text view to close the keyboard.
#1152 [vividus-plugin-browserstack] Use main story name as session name when given story initiates session
0.2.10 - 2020-11-10
Added
#1090 (Closes #1049) New plugin for Apache Kafka (incubating)
"Incubating" means that the plugin is currently a work-in-progress and may change in the future releases.
New step:
When I send data `$data` to Kafka topic `$topic`
#1062 Add ability to fail fast scenario/suite on known issue
New fields are supported in known issue: failScenarioFast
and failStoryFast
#1110 (Closes #571) [vividus-plugin-rest-api] Add ability to create multipart request with dynamic content
Example of initialization of the HTTP request consisting of 4 different parts
Given multipart request:
|type |name |value |contentType|fileName |
|file |file-key |/data/file.txt| |anotherName.txt|
|file |file-key2 |/data/file.txt|text/plain | |
|string|string-key|string1 |text/plain | |
|binary|binary-key|raw |text/plain |raw.txt |
where
value
is the path to the resource with the content forFILE
part type and the actual content forSTRING
andBINARY
part typesfileName
is the name of the file contained in this request part. The parameter is not allowed forSTRING
part type, but it's required forBINARY
one and optional forFILE
part type.
#1080 (Closes #707) [UI] Add step validating sorting order of elements
The new step is available in vividus-plugin-web-app
and vividus-plugin-mobile-app
:
Then elements located `$locator` are sorted by text in $sortingOrder order
where $sortingOrder
is either ASCENDING
or DESCENDING
#1070 [vividus-plugin-mobile-app] Add text part filter
Example of the locator with text part filter
By.xpath(//XCUIElementTypeStaticText)->filter.textPart(Home)
#1088 [vividus-plugin-mobile-app] Add exact text filter
Example of the locator with text part filter
By.xpath(//XCUIElementTypeStaticText)->filter.text(Welcome)
#1072 [vividus-plugin-mobile-app] Add step to navigate back to previous view
Syntax:
When I navigate back
Note: the step doesn't work with newer iOS versions due to absence of navigation controls on the screen
#1086 [vividus-plugin-mobile-app] Add step saving the number of elements to the variable
Syntax:
When I save number of elements located `$locator` to $scopes variable `$variableName`
The same step is also available for web applications when vividus-plugin-web-app
is used.
#1089 [vividus-plugin-mobile-app] Add step activating app
Syntax:
When I activate application with bundle identifier `$bundleId`
where $bundleId
is Package name
for Android or Bundle identifier
from Plist.info
for iOS
#1111 [vividus-plugin-mobile-app] Add step to configure Appium session settings
Syntax:
When I change Appium session settings:$settings
#1076 [vividus-plugin-mobile-app] Log the text being typed
Deprecated
#1086 [vividus-plugin-web-app] Deprecate non-generic step saving the number of elements to the variable
Deprecated step:
When I set the number of elements found `$locator` to $scopes variable `$variableName`
Replacement:
When I save number of elements located `$locator` to $scopes variable `$variableName`
Fixed
#1100 (Fixes #1094) [vividus] Fix state management for sub-steps
Now known issues stop the execution (if any fail-fast option is used) when known issues are detected in the nested steps.
#1112 (Fixes #1093) [vividus] Keep failures if state is reset before scenario
The scenario failures were lost if it's followed by successful scenario, as result the subsequent batches were executed despite bdd.batch-1.ignore-failure=false
property.
#1075 [vividus] Always compare numeric values as numbers
Now the step
Then `$variable1` is $comparisonRule `$variable2`
compares strings with number as numbers. For examples, string "9"
is greater than "10"
and this doesn't make sense for the users, so now the step will treat such strings as numbers and "9"
will be less than "10"
#1079 (Fixes #1069) [vividus] Fix comparison in while-like step condition
Now $expectedValue
parameter of the step:
When I execute steps at most $max times while variable `$variableName` is $comparisonRule `$expectedValue`:$stepsToExecute
can be of any type (the number are not allowed before)
#1071 [vividus-plugin-aws-s3] Fix AWS S3 client initialization
The outdated mandatory properties were removed.
0.2.9 - 2020-10-27
Added
New plugin for mobile native applications (iOS and Android): vividus-plugin-mobile-app
📱
The plugin for mobile native applications (that was incubating in previous versions of Vivivdus) is now supported and subjects to backwards compatibility.
New Vividus profiles:
mobile_app/ios
mobile_app/andoid
Here are the list of the supported steps:
Given I start mobile application
Given I start mobile application with capabilities:$capabilities
When I tap on element located `$locator`
When I tap on element located `$locator` with duration `$duration`
When I swipe $direction to element located `$locator` with duration $swipeDuration
When I type `$text` in field located `$locator`
When I clear field located `$locator`
When I upload file `$filePath` to device
When I wait until element located `$locator` appears
When I wait until element located `$locator` disappears
When I change context to element located `$locator`
When I reset context
When I save text of context element to $scopes variable `$variableName`
When I save `$attributeName` attribute value of element located `$locator` to $scopes variable `$variableName`
When I save `$attributeName` attribute value of context element to $scopes variable `$variableName`
Then number of elements found by `$locator` is $comparisonRule `$quantity`
Then number of $state elements found by `$locator` is $comparisonRule `$quantity`
Then element located `$locator` exists for `$duration` duration
Supported locators:
xpath
accessibilityId
iosClassChain
Supported visibility types:
visible
invisible
all
Checkout the documentation for the details.
#1066 Introduce BrowserStack plugin 👁️
New profiles: browserstack/web
and browserstack/mobile_app
#991 (Closes #81) Add test configuration info to report summary
#1036 Add Behaviors Allure plugin
#996 (Closes #992) Add DISTINCTING
table transformer
DISTINCTING
table transformer acts line SQL distinct statement: it is used to return only distinct (different) values.
#1002 Add while-like step
Syntax:
When I execute steps at most $max times while variable `$variableName` is $comparisonRule `$expectedValue`:$stepsToExecute
#1018 (Closes #883) Support E-notation numbers in round
expression
Now (E-notation numbers)[https://en.wikipedia.org/wiki/Scientific_notation#E_notation] are successfully processed by round
expression, e.g.:
Then `#{round(0.15237E2, 2)}` is equal to `15.24`
#1061 Add groovy expression
The new expression executes groovy script and converts the result to string.
When I initialize Scenario variable `listOfMaps` with values:
|key|
|2 |
|1 |
|3 |
Then `1-2-3` is equal to `#{evalGroovy(return listOfMaps.collect{it['key']}.sort().join('-'))}`
#999 (Closes #762) Add ability to use composite steps to match known issues
Previously only low-level (wrapped executable) steps were supported. Now composite steps of any level can be used.
#1034 [vividus-plugin-web-app & vividus-plugin-mobile-app] Add step to check element existence for a given duration
Syntax:
Then element located `$locator` exists for `$duration` duration
#1057 [vividus-plugin-web-app & vividus-plugin-mobile-app] Add index
filter for locators
The new filter retrieves an element by the specified index from a collection of elements found by a locator. The indexes start from 1.
tagName(div)->filter.index(2)
#978 (Closes #886) [vividus-plugin-web-app] Validate input parameters in step checking the state of the elements
In case when the locator visibility and the checked state are equal (For an example :i
and NOT_VISIBLE
) the exception will be thrown. For such cases use a simple step:
Then number of elements found by `$locator` is $comparisonRule `$quantity`
#801 (Closes #603, #755) [vividus-plugin-web-app] Introduce step adding headers to proxied requests
Syntax:
When I add headers to proxied requests with URL pattern which $comparisonRule `$url`:$headers
#1063 (Closes #1022 ) [vividus-plugin-web-app] Add ability to use set of HTTP methods to catch in proxy steps
Steps that support multiple HTTP methods as input parameter:
Then number of HTTP $httpMethods requests with URL pattern `$urlPattern` is $comparisonRule `$number`
When I capture HTTP $httpMethods request with URL pattern `$urlPattern` and save URL to $scopes variable `$variableName`
When I capture HTTP $httpMethods request with URL pattern `$urlPattern` and save URL query to $scopes variable `$variableName`
When I capture HTTP $httpMethods request with URL pattern `$urlPattern` and save request data to $scopes variable `$variableName`
When I wait until HTTP $httpMethods request with URL pattern `$urlPattern` exists in proxy log
#1005 [vividus-plugin-web-app] Add step to save an URL captured by proxy
Syntax:
When I capture HTTP $httpMethods request with URL pattern `$urlPattern` and save URL to $scopes variable `$variableName`
#979 (Closes #915) [vividus-plugin-web-app] Support debugging of proxy-based tests by taking screenshots
In general browser proxy steps don't publish screenshots on failures, because they don't bring any value, but only affect tests performance. However sometimes the screenshots may be useful to understand the root cause of issues. For such cases new property is introduced:
screenshot.on-failure.debug-modes
Values:
proxy
- (default)
#1003 (Closes #998) [vivdus-plugin-ssh] Add option to enable pseudo-terminal
New property:
ssh.server.<key>.pseudo-terminal-enabled
Values:
true
false
(default)
#1014 (Closes #1006) [vividus-plugin-ssh] Add ability to set channel type: exec or shell
New property:
ssh.server.<key>.channel-type
Values:
exec
(default)shell
#962 (Closes #919) [vividus-plugin-excel] Add ability to extract full table using FROM_EXCEL
transformer
Example of FROM_EXCEL
transformer with full-table range:
{transformer=FROM_EXCEL, path=/my-excel-file.xlsx, sheet=Data, range=A2:B4}
#1020 [vividus-plugin-aws-s3] Rely on AWS SDK default authentication chain
Now the plugin searches for credentials using the default credential provider chain.
#1042 (Closes #1007) [vividus-plugin-aws-s3] Add step to download S3 object
Syntax:
When I fetch object with key `$objectKey` from S3 bucket `$bucketName` and save result to $scopes variable `$variableName`
Deprecated
#983 [vividus-plugin-web-app] Deprecate non-generic steps checking frame existence
Deprecated steps:
Then a frame with the attribute '$attributeType'='$attributeValue' exists
Then a [$state] frame with the attribute '$attributeType'='$attributeValue' exists
Replacement:
Then number of elements found by `$locator` is $comparisonRule `$quantity`
#1034 [vividus-plugin-web-app] Deprecate non-generic step checking existence of element by xpath for a given period of time
Deprecated step:
Then the element with the xpath '$xpath' exists for '$seconds' seconds
Replacement:
Then element located `$locator` exists for `$duration` duration
#1020 [vividus-plugin-aws-s3] Rely on AWS SDK default authentication chain
Deprecated properties:
aws.s3.access-key
aws.s3.secret-key
Replacement:
system.aws.accessKeyId
system.aws.secretKey
Fixed
#990 [vividus-plugin-rest-api] Fix handling of '=' sign in FROM_JSON
table transformer
Now values containing =
are parsed correctly in the parameters of FROM_JSON
table transformer
#1021 [vividus-plugin-web-app] Remove empty browserVersion
capability
When custom Selenium Grid was used, the empty browserVersion
capability blocked search of the requested browser node.
#1025 [vividus-plugin-web-app] Fix NPE at conversion of property value to Locator type
#1045 (Fixes #422) [vividus-plugin-web-app] Bump MacOS version from 10.13(High Sierra) to 10.14(Mojave)
The issue was caused by old Safari Driver version having click issues.
#1053 [vividus-plugin-web-app] Fix configuration of screen-resolution
capability
The previous default value of screen-resolution capability (1920x1080) was not universal, e.g. it's not applicable for MacOS platform on SauceLabs.
The screen-resolution
fix includes:
- setting of the default value (1920x1080) for Chrome, Edge, Firefox, IE profiles
- setting of the empty value for Safari profile (the empty value will result in default value for the concrete Selenium Grid implementation, e.g. it's 1024x768 for SauceLabs now)
#1043 [vividus-plugin-saucelabs] Make SauceLabs DataCenter property case-insensitive
This is a workaround for the saucerest-java library issue. The actual fix is saucelabs/saucerest-java#127.
#1044 (Fixes #1027) [vividus-plugin-saucelabs] Trim SauceLabs REST API URL
SauceLabs REST API URL with leading or/and trailing whitespaces leads to inability to start SauceConnect. The actual fix is saucelabs/ci-sauce#74.
0.2.8 - 2020-10-02
Added
#954 (Closes #661) Introduce SauceLabs plugin 🚀
Highlights:
- New profiles:
saucelabs/web
andsaucelabs/mobile_app
- Ability to run and configure standalone SauceConnect
- Ability to use Proxy along with SauceLabs (SauceConnect will start automatically)
Checkout the documentation for the details.
#857 (Closes #686) [vivdus-plugin-web-app] Add actions to press several keys simultaneously
New actions are KEY_DOWN
and KEY_UP
Example:
When I execute sequence of actions:
|type |argument|
|KEY_DOWN |CONTROL |
|PRESS_KEYS|a |
|KEY_UP |CONTROL |
|PRESS_KEYS|DELETE |
#903 (Closes #866) [vividus-plugin-web-app] Add ability to configure application lifecycle
New property:
web-application.session-scope
The acceptable values are story
(by default) and scenario
. The property defines the test lifecycle of the browser:
- the browser opens at the first step requiring browser interaction
- the browser closes after
story
orscenario
depending on the property value - each scenario-level examples table iteration is treated as a separate scenario
An empty property value will lead to the error: Application session scope is not set
.
#889 (Closes #858) [vividus-plugin-web-app] Add steps to interact with dropdown elements using locators
New steps:
- When I select `$option` in dropdown located `$locator`
- When I add `$option` to selection in dropdown located `$locator`
- Then dropdown located `$locator` contains options: $option
- Then dropdown located `$locator` exists and selected option is `$option`
#876 [plugin-rest-api] Add step waiting for JSON element with polling interval
Syntax:
When I wait for presence of element by `$jsonPath` with `$pollingInterval` polling interval retrying $retryTimes times$stepsToExecute
Example:
Scenario: Wait for presence of element by JSON path $.data.testData
When I wait for presence of element by `$.data.testData` with `PT5S` polling interval retrying 10 times
|step |
|When I set request headers: |
|{headerSeparator=!,valueSeparator=!} |
|!name !value !|
|!Authorization !${accessToken} !|
|When I issue a HTTP GET request for a resource with the URL '${requestUrl}'|
#928 (Closes #881) [vivdus-plugin-rest-api] Add step to add HTTP request headers
Syntax:
When I add request headers:$headers
Example:
When I add request headers:
|name |value |
|Accept-Language|en-ru |
Deprecated
#922 [vividus-plugin-web-app] Deprecate non-generic step waiting while element with the name appears
Deprecated step:
When I wait until elements with the name '$elementName' appear
Replacement:
When I wait until element located `$locator` appears
Example of replacement:
When I wait until element located `By.elementName(<elementName>)` appears
#889 [vividus-plugin-web-app] Deprecate non-generic steps for dropdown elements
Deprecated steps:
- When I select `$text` from drop down located `$locator`
- When I select '$text' from a drop down with the name '$dropDownName'
- When I add '$text' to selection in a drop down with the name '$dropDownName'
- Then a drop down with the name '$dropDownName' does not exist
- Then a [$state] drop down with the name '$dropDownName' exists
- Then a drop down with the name '$dropDownName' exists
- Then a drop down with the name '$dropDownName' and text '$dropDownText' exists
- Then a drop down with the name '$dropDownName' contains the items: $dropDownItems
Fixed
#949 (Fixes #851) Rank pending status higher than known-issues-only
Previously if test run contained passed, known-issues-only and pending results, the final status was set to yellow (known-issues-only), it led to false-positive results. Now if test run contains passed, known-issues-only and pending results, its final status is failed.
#953 (Fixes #951) Fix handling of table properties changes by transformers
ExamplesTable transformers may change ExamplesTable data, as result the original separators may be not valid anymore, here is a schematic example of such transformation:
{headerSeparator=!, valueSeparator=!}
|header 1| !header|1!
|value 11| -> !value|11!
|value 12| !value|12!
Now to address the changes in separators ExamplesTable transformers updates the data in ExamplesTable properties automatically.
#862 [vividus-plugin-web-app] Fix NPE when browser session starts in Lifecycle Before Story steps
Example:
Lifecycle:
Before:
Scope: STORY
Given I am on a page with the URL 'https://google.com'
#944 (Fixes #784) Throw user-friendly error when missing main application page URL is used
0.2.7 - 2020-08-26
Added
#781 Add ability to use steps executing nested steps as nested ones
If the same step is used as both wrapping and nested, there is no ability to parse it unequivocally (only human can understand where the step starts and where it ends, and this understanding is based mostly on actual step logic, not the step syntax only). So aliases for already existing steps were introduced:
When variable '$name' is not set I do:$stepsToExecute
When I '$number' times do:$stepsToExecute
When I execute steps while counter is $comparisonRule '$limit' with increment '$increment' starting from '$seed':$stepsToExecute
Example:
When I `...` times do:
{headerSeparator=!, valueSeparator=!}
!step !
!When I '...' times do:!
!|step |!
!|... |!
#803 (Closes #800) Add a possibility to enable/disable potentially known issue tracking in Allure report
New property:
known-issue-provider.detect-potentially-known-issues
The default value is true
#815 Introduce set of expressions for URI parts encoding
${encodeUri<Part>(..)}
is a family of expressions that encode specific URI components (e.g. path, query) by percent encoding illegal characters, which includes non-US-ASCII characters, and also characters that are otherwise illegal within the given URI component type, as defined in RFC 3986.
New expressions:
#{encodeUriUserInfo($userInfo)}
#{encodeUriHost($host)}
#{encodeUriPath($path)}
#{encodeUriPathSegment($segment)}
#{encodeUriQuery($query)}
#{encodeUriQueryParameter($queryParameter)}
#{encodeUriFragment($fragment)}
#827 Add ability to select rows to use from the table by row indexes
New parameter byRowIndexes
is introduced in FILTERING
transformer
Example:
Examples:
{transformer=FILTERING, byRowIndexes=0;2}
|key |
|value0|
|value1|
|value2|
#837 (Closes #802) [vividus-plugin-web-app] Add dynamic variables providing element dimensions
New dynamic variables:
${context-height}
${context-width}
${context-x-coordinate}
${context-y-coordinate}
Example:
hen I change context to element located `tagName(img)`
Then `${context-height}` is > `0`
Then `${context-width}` is > `0`
Then `${context-x-coordinate}` is > `0`
Then `${context-y-coordinate}` is > `0`
#834 [vividus-plugin-web-app] Add step verifying elements number and their state
Syntax:
Then number of $state elements found by `$locator` is $comparisonRule `$quantity`
The step validates if the number of elements located by the locator matches the comparison rule and all of them are in the desired state. For example, If you set comparison rule as equal to 5, then in case if there are 10 elements by the locator and only 5 of them in the desired state, you will get two failed assertions: the first one about unexpected total number of elements, the second one about unexpected states of the elements.
#831, #850 (Closes #804) [vividus-plugin-web-app] Add possibility to interact with checkboxes using locators
New steps:
- When I $checkboxAction all checkboxes located by `$checkboxesLocator`
- When I $checkBoxAction checkbox located by `$checkboxLocator`
Deprecated
#815, #829 Deprecate #{encodeUrl(..)}
expression in favor of new expressions
#{encodeUrl(..)}
expression is deprecated, use set of #{encodeUri<Part>(..)}
expressions instead.
#831, #850 [vividus-plugin-web-app] Deprecate non-generic steps interacting with checkboxes
Deprecated steps:
- Then a checkbox with the name '$checkboxName' exists
- Then a [$state] checkbox with the name '$checkboxName' exists
- When I $checkBoxAction a checkbox with the name '$checkBoxName'
- When I check a checkbox
- When I check all the checkboxes
- When I uncheck a checkbox with the attribute '$attributeType'='$attributeValue
- Then a checkbox with the attribute '$attributeType'='$attributeValue' exists
- Then a [$state] checkbox with the attribute '$attributeType'='$attributeValue' exists
- When I $checkBoxAction a checkbox by the xpath '$xpath'
- When I check a checkbox with the attribute '$attributeType'='$attributeValue'
- Then a checkbox with the name '$checkBox' does not exist
Fixed
#788 Fix handling of encoded ampersand in URL query
Now URLs with percent-encoded ampersand in the query part are handled properly: https://vividus.dev/get?key=a%26b
#814 (Fixes #763) Fix handling of variables of different nesting step-levels
Since Vividus supports nested steps, the variables of step-level should be initialized and cleaned up according to their level.
Previously the variables of different step levels were stored in a single collection, which was cleaned up after each step, as result the nested steps could remove variables created at wrapping steps.
#818 (Fixes #797) Improve error messages for missing configuration items
Now configuration collection defined in properties (e.g. DB access configuration, SSH server, and etc.) handles missing items with clear error message: e.g. Database connection with key 'XYZ' is not configured in properties
#782 [vividus-plugin-datetime] Require T designator for time part in date expression
Now the expression generating date requires T
sign if date is based on time shift. For example, #{generateDate(P10S)}
is considered as invalid, and it should be fixed in the following way: #{generateDate(PT10S)}
#796 (Fixes #769) [vividus-plugin-db] Ensure order of columns is ignored in DB comparison steps
The affected steps:
- When I wait for '$duration' duration retrying $retryTimes times while data from `$sqlQuery` executed against `$dbKey` is equal to data from:$table
- Then `$data` matching rows using `$keys` from `$dbKey` is equal to data from:$table
- Then data from `$sourceSqlQuery` executed against `$sourceDbKey` is equal to data from `$targetSqlQuery` executed against `$targetDbKey` matching rows using keys:$keys
#836 [vividus-plugin-web-app] Throw exception if unsupported filter is used in the locator
If locator contains unsupported filter (e.g. By.id(id)->filter.unknown(any)
), the exception will be thrown (Previously such filters were silently ignored, and as result users might have a false impression that it works as expected)
#848 (Fixes #838) [vividus-plugin-rest-api] Fix filtering of cookies by root path
Now the step saving value of the cookie performs the following filtering:
- applying name filter to the full cookie store
- apply path filter to cookies filtered by the previous filter (not to the full cookie store)
0.2.6 - 2020-07-28
Added
#765 [vividus-plugin-web-app] Add ability to set desired capabilities at story level using meta with prefix capability.
The example of the story:
Meta:
@capability.browserName IE
@capability.browserVersion 11.0
Scenario: Browser should correspond options set in meta
Given I am on a page with the URL 'https://www.whatismybrowser.com'
Then the text 'Internet Explorer 11' exists
Changed
#779 Improve error messages for validations of table transformer parameters
Now actual values are included in error messages to give users a clue regarding possible mistake.
The example of the error message:
Value of ExamplesTable property 'joinMode' must be from range [ROWS, COLUMNS], but got 'invalidMode'
Fixed
#776 (Fixes #767) Restore ExamplesTable properties parsing
- #777 ExamplesTable properties values with whitespaces are parsed correctly
- #778 Nested table transformers of any level are processed correctly
#722 (Fixes #533) [vividus-plugin-web-app] Exclude parent elements when By.caseInsensitiveText
search is used
Now only the deepest child is included in the results when By.caseInsensitiveText
search is used (all parents elements of this child are excluded from the results by default)
#764 (Fixes #759) [vividus-plugin-web-app] Fix inability to capture secured requests by the browser proxy
Conflicting versions of netty
dependency caused exceptions, like java.lang.NoSuchMethodError: io.netty.buffer.ByteBuf.maxFastWritableBytes()I
, which led to inability to capture secured requests by the browser proxy.
The removal of explicit littleproxy
dependency allowed to rely on dependency management on browserup-proxy
side: browserup/browserup-proxy@5fab82c
0.2.5 - 2020-07-20
Added
#689 (Closes #621) Add a plugin for work with email servers (#689)
New plugin allowing to read message from email servers was implemented: vividus-plugin-email
.
Supported protocol is IMAP
.
New step:
When I fetch email message from `$serverKey` server filtered by $filters and save message content to $scopes variable `$variableName`
Example:
When I fetch email message from `gmail` server filtered by
|parameter |rule |value |
|SUBJECT |EQUAL_TO |Registration code |
|SENT_DATE |GREATER_THAN |1970-01-01T00:00:00.000Z |
|RECEIVED_DATE |LESS_THAN |2020-06-14T11:47:11.521Z |
|FROM |IS_EQUAL_TO |service <regservice@company.com> |
|CC_RECIPIENTS |CONTAINS |admin |
|BCC_RECIPIENTS|DOES_NOT_CONTAIN|gmail.com |
|TO_RECIPIENTS |EQUAL_TO |me <me@company.com>, boss <boss@company.com>|
|REPLY_TO |MATCHES |(?i)[0-9]@.* |
and save message content to SCENARIO variable `textContent`
Then `textContent[1]` matches `.*Registration code.*`
Check out the official documentation for more details: https://docs.vividus.dev/vividus/0.2.5/plugins/plugin-email.html.
#734 Add validation of ExamplesTable with sub-steps
The explicit validation of ExamplesTable-s containing sub-steps was added to give users clear error message in case of mistakes and typos in the input data.
#746, #747 (Closes #647) Add ability to define ExamplesTable properties that shouldn't be trimmed
ExamplesTable properties can be used with decorators now.
Example:
Scenario: Verify FROM_EXCEL transformer
Then `<joined>` is equal to `line 1 line 2 line 3`
Examples:
{transformer=FROM_EXCEL, path=/data/excel.xlsx, sheet=Sheet1, addresses=A1, column=joined, \{lineBreakReplacement|VERBATIM\}= }
The available decorators (values are case-insensitive):
LOWERCASE
UPPERCASE
VERBATIM
TRIM
(default, if no decorators are provided, the properties values are trimmed)
#746, #754 (Closes #649) Allow to use comments and to ignore steps in textual composite steps.
Now it's possible to declare composite steps with comments and ignored steps without any side effect:
Composite: When I execute a composite step with comment
When I initialize the scenario variable `before-comment` with value `before`
!-- This is a comment in the composite step implementation
When I initialize the scenario variable `after-comment` with value `after`
Composite: When I execute a composite step with ignored step
When I initialize the scenario variable `before-ignored` with value `before`
!-- When I initialize the scenario variable `ignored` with value `ignored`
When I initialize the scenario variable `after-ignore` with value `should not be executed`
#683 (Closes #394) [vividus-plugin-web-app] Add step capturing requests by browser proxy
Syntax:
When I capture HTTP $httpMethod request with URL pattern `$urlPattern` and save request data to $scopes variable `$variableName`
Example:
When I capture HTTP POST request with URL pattern `http://httpbin.org/post` and save request data to SCENARIO variable `requestData`
Then `${requestData.query}` is equal to `{}`
Then `${requestData.requestBodyParameters}` is equal to `{delivery=, custtel=, comments=, custemail=, custname=}`
Then `${requestData.requestBody}` is not equal to `null`
Then `${requestData.responseStatus}` is equal to `200`
Fixed
#724 (Fixes #692) Resolve Vividus variables in ExamplesTable-s used as step input parameters
#733 (Fixes #732) Fix resolving of placeholders in empty ExamplesTable
Usage of empty ExamplesTable-s as step input parameters caused java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
. Now empty tables are handled without any errors.
#748 [vividus-plugin-excel] Fix sheets number check to do not get out of range
Make sure users are not allowed to get Excel sheet by index which doesn't exist.
0.2.4 - 2020-07-08
Added
#636 (Closes #583) Add ability to ignore failures at batch level
The ignorance of failures per batch can be configured via properties. If the property is set to false
and any failure is occurred during the batch execution, the subsequent batches are not executed.
Syntax:
bdd.batch-<batch-number>.ignore-failure=<true|false>
Example:
bdd.batch-1.ignore-failure=true
If batch-level properties are not set, the global configuration property bdd.ignore-failure-in-batches
is used.
#693, #700, #711 (Closes #691) Resolve nested expressions/variables
Vividus variables and expressions can be nested into each other, e.g:
${var#{eval(${var#{eval(<iterator> + 1)}} + 1)}}
Also Vividus is capable to handle circular variable references (even in fact it's not a valid case):
When I initialize the scenario variable `value` with value `#{removeWrappingDoubleQuotes(${value})}`
Then `${value}` is equal to `${value}`
#697 (Closes #696) Add ability to use Vividus variables in eval
expression
Example:
When I initialize the story variable `someVar` with value `1`
Then `#{eval(${someVar} + 1)}` is equal to `2`
#613 (Closes #609) Add REPEATING table transformer
REPEATING
table transformer is useful when it's required to generate a large set of identical or similar data.
Example:
Scenario: Verify REPEATING transformer
Then `<column1>` is equal to `A B A B A B`
Then `<column2>` is equal to `C D C D C D`
Examples:
{transformer=REPEATING, times=3}
{transformer=JOINING, joinMode=rows}
|column1|column2|
|A |C |
|B |D |
#614 (Closes #562) Add ability to filter rows by regex in FILTERING transformer
New option to filter rows by cell values is added to FILTERING
table transformer.
Syntax:
{transformer=FILTERING, column.<column name>=<regex filter>}
Example:
{transformer=FILTERING, column.city=^M.*$}
|city |
|Minsk |
|London |
|Moscow |
|Paris |
|Milan |
will result in
|city |
|Minsk |
|Moscow |
|Milan |
#624 (Closes #570) Add support of rounding mode in round
expression
Syntax:
#{round(<value>, <max fraction digits>, <rounding mode>)}
where <max fraction digits>
and <rounding mode>
are optional.
The available rounding modes are:
ceiling
floor
up
down
half_up
half_down
half_even
unnecessary
The values are case-insensitive.
The default rounding modes are:
half_up
for positive numbershalf_down
for negative numbers
#665 (Closes #544) Add known issues to Allure report categories
#678, #684 (Closes #648) Relax parsing rules for input parameters with the pre-defined range of values
Extra whitespaces around input parameters with the pre-defined range of values led to the errors like:
ParameterConvertionFailed: Failed to convert VISIBLE_ for Enum org.vividus.ui.web.State
To make test creation more user-friendly the parsing rules were relaxed and now all whitespace around such parameters are trimmed.
#568 (Closes #527) [vividus-plugin-web-app] Add step to wait for the desired web element state
Syntax:
When I wait `$duration` with `$pollingDuration` polling until element located `$locator` becomes $state
The list of available states is following:
enabled
disabled
selected
not selected
visible
not visible
Example:
When I wait `PT10S` with `PT1S` polling until element located `By.id(element-to-show)` becomes visible
#620 (Closes #607) [vividus-plugin-web-app] Add ability to execute some web actions without argument
The following actions of step When I execute sequence of actions: $actions
can skip an input argument:
click
double click
click and hold
release
#646 (Closes #598) [vividus-plugin-web-app] Add ability to retry search for staled elements
The process of page DOM building could be complex in the modern web applications. It may result in errors like stale element reference: element is not attached to the page document
at web element search, while screenshot taken on failure will show presence of web elements. The ability to retry search was added to eliminate the side effect of such page DOM building process.
New property is web.search.retry-search-if-stale
(default value is false
)
#685 [vividus-plugin-web-app] Handle staled search context in user-friendly way
In case of staled search context users will see the error like:
Search context used for search is stale.
Please double check the tests.
You have a few options:
1. Reset context;
2. Synchronize the tests to wait for context's stabilization
#615, #619 (Closes #563, #618) [vividus-plugin-datetime] Add ability to define date diff output format
The Vividus expression diffDate
accepts the output format as a last parameter. This parameter is optional and case-insensitive, the list of supported values is following:
nanos
micros
millis
seconds
minutes
hours
days
weeks
months
years
decades
centuries
Example:
Scenario: Verify diffDate with formatting
Then `#{diffDate(2019-01-01T12:00:00.223Z,yyyy-MM-dd'T'HH:mm:ss.SSSVV, 2019-01-01T12:00:01.000Z,yyyy-MM-dd'T'HH:mm:ss.SSSVV, millis)}` is equal to `777`
#602 (Closes #546) [vividus-plugin-rest-api] Add step waiting for HTTP response with specified code
Syntax:
When I wait for response code `$responseCode` for `$duration` duration retrying $retryTimes times$stepsToExecute
Example:
When I wait for response code `200` for `PT10S` duration retrying 10 times
|step |
|When I issue a HTTP GET request for a resource with the URL '${my-rest-endpoint}/api/delayed-response'|
#664 (Closes #659) [vividus-plugin-rest-api] Add step to save cookie value as variable
Syntax:
When I save value of HTTP cookie with name `$cookieName` to $scopes variable `$variableName`
Example:
When I save value of HTTP cookie with name `SESSION_ID` to scenario variable `session-id`
#677 (Closes #660) [vividus-plugin-rest-api] Add step to change cookie value
Syntax:
When I change value of all HTTP cookies with name `$cookieName` to `$newCookieValue`
Example:
When I change value of all HTTP cookies with name `SESSION_ID` to `fake-session-id`
#680 (Closes #599) [vividus-plugin-rest-api] Add ability to execute HTTP POST requests without body
According to the HTTP specification the request body is not required for POST method.
#713 (Closes #681) [vividus-plugin-rest-api] Add step to check secure protocols supported by server
Syntax:
Then server `$hostname` supports secure protocols that $collectionComparisonRule `$protocols`
Example:
Then server `vividus-test-site.herokuapp.com` supports secure protocols that contain `TLSv1.3,TLSv1.2`
Deprecated
#568 [vividus-plugin-web-app] Deprecate non-generic step waiting until web element appears
Deprecated step:
When I wait '$duration' with '$pollingDuration' polling until an element located by $locator appears
When I wait '$duration' with '$pollingDuration' polling until an element with the xpath '$xpath' appears
Replacement:
When I wait `$duration` with `$pollingDuration` polling until element located `$locator` becomes $state
Fixed
#668 (Fixes #667) Fix processing of variable with dot and default value
Previously the variables containing dot in name and referred in scenarios with default values were resolved to default values ignoring their actual values assigned in the story above or properties files.
#676 Fix report generation when no test was run
If no test was run, then allure results directory was not created which led to the exception like:
java.nio.file.NoSuchFileException: .../allure-results/categories.json
The fix ensure that allure results directory exists before the report generation starts.
#714 Fix reporting of story-level GivenStories and LifecycleBeforeStory steps used in the same story
#642 (Fixes #641) [vividus-plugin-web-app] Fix NPE when cookies are set without prior page navigation
If step When I set all cookies for current domain:parameters
was used before application page was opened step failed and was marked as broken with NullPointerException
which made difficult to understand what was wrong in test scenario.
#626 (Fixes #623) [vividus-plugin-rest-api] Fix detection of empty JSON array diff
The step to compare json element with expected data was marked as passed, though if to expand step details it became clear that step actually failed. This usually happened if json element could not be located by provided json path or if its structure sufficiently differed from the expected value.
#638 (Fixes #587) [vividus-plugin-rest-api] HTML-encode HTTP messages in attachments
When the body of the response contained characters like "& # 58; & # 34; -1 & # 34;" there was no tree-like view of response in Allure report.
#682 [vividus-plugin-rest-api] Fix truncated chunk exception
0.2.3 - 2020-05-22
Added
#502 (Closes #457) Add RESOLVING_EXPRESSIONS_EAGERLY
table transformer
When Vividus expression for data generation is used in tables, the expression is resolved lazily at each placeholder, as result the new value is pasted instead of each placeholder. After applying of new RESOLVING_EXPRESSIONS_EAGERLY
transformer the expressions in the table will be resolved eagerly and each placeholder will be replaced with the same value.
Example:
{transformer=RESOLVING_EXPRESSIONS_EAGERLY}
|name |
|#{generate(Address.firstName)}|
#522 (Closes #456) Add RESOLVING_SELF_REFERENCES_EAGERLY
table transformer
The new transformer allows to use self-references (reference in a cell to a value from another column within a single table)
Example:
{transformer=RESOLVING_SELF_REFERENCES_EAGERLY}
|column1|column2 |
|A |<column1>|
#531 Make all properties overridable from project properties files
Previously Vividus contained a set of properties which was not expected to be overridden from the root level, and in case when users tried to override them (e.g. in configuration.properties
), the behavior was unpredictable, since the order of loading properties from the same level is unpredictable.
Now all properties can be overridden at any level.
#554 (Closes #550) Add ability to use placeholders in configuration properties
The values of the properties:
configuration.profile
configuration.profiles
configuration.environments
configuration.suite
can include placeholders for another properties now.
The properties used as placeholders may be declared in:
configuration.properties
overriding.properties
#513 #523 #537 #588 #593 #597 (Closes #406, #591) [vividus-allure-adaptor] Add trends and history to Allure report
The property to define folder to keep historical data:
allure.history-directory
(default value is${output.directory}/history
)
#584 (Closes #543) [vividus-allure-adaptor] Add Executor info to Allure report
The properties to define executor info (all properties are optional):
allure.executor.name
- the executor nameallure.executor.type
- one of the supported executor types:jenkins
,teamcityr
,bamboo
; it's allowed to set a custom type, but the executor icon will be common in this case.allure.executor.url
- the executor root URLallure.executor.build-order
- the build numberallure.executor.build-name
- the build nameallure.executor.build-url
- the full build URLallure.executor.report-url
- the full Allure report URLallure.executor.report-name
- the report name
Example:
allure.executor.name=My Super Jenkins
allure.executor.type=jenkins
allure.executor.url=http://my-super-jenkins.org
allure.executor.build-order=77
allure.executor.build-name=regression-tests#77
allure.executor.build-url=http://my-super-jenkins.org/job/regression-tests/77/
allure.executor.report-url=http://my-super-jenkins.org/job/regression-tests/77/Allure_Report
allure.executor.report-name=Regression tests report
#528 (Closes #517) [vividus-plugin-web-app] Add MOVE_TO
action support to the actions step
MOVE_TO
action mouseovers the specified element
Example:
When I execute sequence of actions:
|type |argument |
|MOVE_TO|By.xpath(//div[contains(., 'Mouse over me!')])|
#539 (Closes #436) [vividus-plugin-web-app] Add step to scroll element into view
Syntax:
When I scroll element located `$locator` into view
Example:
When I scroll element located `By.xpath(//a[text()="Contact"])` into view
#549 [vividus-plugin-web-app] Unify syntax of step changing context by locator
Syntax:
When I change context to element located `$locator`
#553 [vividus-plugin-web-app] Add step to enter text using keyboard
Syntax:
When I enter `$text` in field located `$locator` using keyboard
#567 (Closes #551) [plugin-web-app] Add step to wait for scroll
Syntax:
When I wait until scroll is finished
#572 Introduce step to switch to a frame using locator
Syntax:
When I switch to frame located `$locator`
#574 [vividus-plugin-web-app] Enable cookie subdomain matching to host
If the cookie domain does not equal the exact host, org.apache.http.cookie.ClientCookie.DOMAIN_ATTR
must be set. For example: previously cookies with domain '.imdb.com' were not passed if URL was 'https://www.imdb.com/', only cookies with domain 'www.imdb.com' were passed.
See implementation details:
org.apache.http.impl.cookie.BasicDomainHandler#domainMatch
More information:
- https://hc.apache.org/httpcomponents-client-ga/tutorial/html/statemgmt.html
- https://stackoverflow.com/a/31428811/2067574
- https://stackoverflow.com/a/31428794/2067574
#596 (Closes #595) [vividus-plugin-web-app] Add step to check page scrolled to element by locator
Syntax:
Then page is scrolled to element located `$locator`
#555 (Closes #501) [viviuds-plugin-rest-api] Add ability to define cookie store level
New property:
rest-api.http.cookie-store-level
Allowed property values:
global
(by default) - cookies are shared between all threadsstory
- cookies are kept at the story level (each story has own cookie store)scenario
- cookies are kept at the scenario level (each story has own cookie store and it's cleaned after each scenario)
#592 (Closes #88) [vividus-analytics] Introduce Vividus insight
Vividus can collect anonymous usage statistics (Google Analytics is used). This feature is turned off by default, if you want to help Vividus team with collecting statistics and with prioritizing the features waiting for implementation, please enable analytics:
analytics.enabled=true
The collected data:
- Java version
- Vividus version
- Vividus plugins
- Vividus profiles
- is Selenium Grid used
- tests duration
- total number of executed stories, scenarios and steps
Changed
#499 Refine binding of Vividus meta to Allure labels
Links in Allure report are generated from the following meta:
@testCaseId
@issueId
@requirementId
The corresponding properties to define link URL patterns are:
system.allure.link.tms.pattern
system.allure.link.issue.pattern
system.allure.link.requirement.pattern
Meta @testTier
is deprecated in favor of new meta @severity
to keep consistency in the reporting. The acceptable range of values is left unchanged: 1..5.
Meta @group
is no more mapped to Allure labels since it's not used in the reporting. But it's still can be used by users to mark stories and scenarios for filtering.
Meta @epic
and @feature
are reserved for future use in Allure Behaviors plugin.
#572 [vividus-plugin-web-app] Reset context before switching to a frame
Previously the step When I switch to a frame by the xpath '$xpath'
didn't reset the context before search.
Now all steps switching to a frame reset context at the start.
Deprecated
#549 [vividus-plugin-web-app] Unify syntax of step changing context by locator
Deprecated step:
When I change context to an element by $locator
Replacement:
When I change context to element located `$locator`
#572 [vividus-plugin-web-app] Deprecate non-generic frame steps
Deprecated steps:
When I switch to a frame by the xpath '$xpath'
When I switch to a frame with the attribute '$attributeType'='$attributeValue'
When I switch to a frame number '$numberValue' with the attribute '$attributeType'='$attributeValue'
Replacement:
When I switch to frame located `$locator`
#596 [vividus-plugin-web-app] Deprecated non-generic step to checking if page is scrolled to element
Deprecated step:
Then the page is scrolled to an element with the attribute '$attributeType'='$attributeValue'
Replacement:
Then page is scrolled to element located `$locator`
Fixed
#547 #548 Fix handling of plus character in URL
https://bugs.openjdk.java.net/browse/JDK-8179507
https://stackoverflow.com/questions/43375916/urldecoder-is-converting-into-space:
"According to HTML URL Encoding Reference:
URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign or with %20."
#497 [vividus-extension-visual-testing] Reset scenario-based indexer after scenario
#519 [vividus-http-client] Use default retry handler if no idempotent methods set
#521 (Fixes #520) [vividus-plugin-web-app] Fix to open Chrome browser maximized
#532 [vividus-plugin-web-app] Swallow error quietly in case of unsuccessful scroll
There are use-cases when it's required to check browser console log to verify the application works as expected. The console errors from vividus brings unexpected useless noise here.
#536 (Fixes #486) [vividus-plugin-web-app] Round window.scrollY
at page scroll
https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY
`window...