-
Notifications
You must be signed in to change notification settings - Fork 4
Add neo properties chapter #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wurzelkuchen
wants to merge
23
commits into
neodymium-documentation
Choose a base branch
from
add_neo_properties_chapter
base: neodymium-documentation
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
4a97334
initial 'Quick Start' guide and some notes for the cheat sheet
RobertAvemarg c24466a
improved Cheat-Sheet
RobertAvemarg 57a0e88
updated the changed default browser behaviour
RobertAvemarg bdf00e5
fixed landing page layout: updates 3col-layout to use either image or…
472fd3a
add browser handling and WebDriver chapter
RobertAvemarg f6c31ff
add test data chapter
RobertAvemarg 4cabdbd
add neodymium properties
RobertAvemarg 21c79d2
added missing neodymium property descriptions
RobertAvemarg 59b8492
add utility classes chapter and some fixes
RobertAvemarg cf20d46
added Cucumber and fixed formatting
RobertAvemarg 1279718
add localization chapter
RobertAvemarg e9936ed
renamed multi-browser page
RobertAvemarg 7e411b6
added logging
RobertAvemarg 57072db
added baise description
8d85c41
reworked cheat sheet
0204c83
rechecked webdirver and added some changes, move one chapter to browsers
05e2871
changed headline style to Title Caseing
2c4c560
more headline changes
5167e80
add accessibility testing chapter
RobertAvemarg c848686
added requested changes from review
RobertAvemarg bd7c1a3
Allure - WIP
RobertAvemarg 546a3c1
WIP
RobertAvemarg 53f8122
moved more pages
RobertAvemarg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,5 @@ public/ | |
| resources/ | ||
| node_modules/ | ||
| .hugo_build.lock | ||
| .vscode | ||
| .vscode | ||
| .idea | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,19 +6,19 @@ | |
|
|
||
| {{< blocks/cover title="Welcome to the Xceptance Documentation Hub!" image_anchor="top" height="auto">}} | ||
| <section class="row"> | ||
| {{% blocks/feature2 image="home/XLT-logo-light.svg" title="XLT Documentation" url="/xlt" url_text="More about Load Testing with XLT"%}} | ||
| {{% blocks/feature3 image="home/XLT-logo-light.svg" title="XLT Documentation" url="/xlt" url_text="More about Load Testing with XLT"%}} | ||
| XLT is a load and performance test tool that differs from other approaches due to its focus on high quality reporting and Java as programming language for the scripts. There are many ways to work with XLT and this documentation will show you some. It will explain features and functionalities and hopefully inspires you to take your performance testing to the next level. | ||
| {{% /blocks/feature2 %}} | ||
| {{% /blocks/feature3 %}} | ||
|
|
||
|
|
||
| {{% blocks/feature2 image="home/XTC-logo-light.svg" title="XTC Documentation" url="/xtc" url_text="More about Xceptance Test Center"%}} | ||
| {{% blocks/feature3 image="home/XTC-logo-light.svg" title="XTC Documentation" url="/xtc" url_text="More about Xceptance Test Center"%}} | ||
| Xceptance Test Center (XTC) is the upcoming SaaS solution for XLT and related testing services, such as monitoring. This documentation as well as XTC itself are work in progress and will be progressively enhanced, in parts by your feedback. | ||
| {{% /blocks/feature2 %}} | ||
| {{% /blocks/feature3 %}} | ||
|
|
||
|
|
||
| {{% blocks/feature2 image="home/neo-logo-TODO.svg" title="Neodymium Documentation" url="/neodymium" url_text="More about Xceptance Test Center"%}} | ||
| {{% blocks/feature3 image="home/neo-logo-TODO.svg" title="Neodymium Documentation" url="/neodymium" url_text="More about Xceptance Test Center"%}} | ||
| How do those fricking magnets work and why do they automate browsers | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace this paceholder |
||
| {{% /blocks/feature2 %}} | ||
| {{% /blocks/feature3 %}} | ||
|
|
||
|
|
||
| </section> | ||
|
|
||
656 changes: 651 additions & 5 deletions
656
content/en/neodymium/test-automation/020-cheat-sheet.md
Large diffs are not rendered by default.
Oops, something went wrong.
148 changes: 148 additions & 0 deletions
148
content/en/neodymium/test-automation/advanced/001-webdriver.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| --- | ||
| title: "WebDriver Handling" | ||
|
|
||
| weight: 01 | ||
| type: docs | ||
|
|
||
| description: > | ||
| Everything about WebDrivers. | ||
| --- | ||
|
|
||
| To run browser tests a WebDriver for the desired browser is necessary. If the driver is missing, Selenium will | ||
| automatically download the latest one. | ||
|
|
||
| Within the file `config/browser.properties` you can set up the browsers used throughout testing. | ||
| More details on configuring the browser properties can be found in the | ||
| [browser handling chapter]({{< relref "010-browser" >}}). | ||
|
|
||
| The next three sections describe how to set up specific WebDriver and browsers. | ||
|
|
||
| ## Set up a specific WebDriver | ||
|
|
||
| For that, you have to download and provide a | ||
| specific [Selenium WebDriver](http://www.seleniumhq.org/projects/webdriver/). | ||
|
|
||
| You can download the common ones here: | ||
|
|
||
| * [ChromeDriver](https://googlechromelabs.github.io/chrome-for-testing/) | ||
| * [GeckoDriver (Firefox)](https://github.com/mozilla/geckodriver/releases) | ||
| * [InternetExplorerDriver](https://www.microsoft.com/en-us/download/details.aspx?id=44069) | ||
|
|
||
| After downloading you can configure them in the `config/neodymium.properties` file. Find the line that matches the | ||
| WebDriver of your choice e.g. `neodymium.webDriver.chrome.pathToDriverServer = C:/dev/webdriver/chromedriver.exe` or | ||
| add them to the PATH of your system. | ||
|
|
||
| ## Set up a specific browser | ||
|
|
||
| Sometimes the browser of your choice is not configured in your system PATH and the WebDriver is not able to find it. Or | ||
| you would like to test a certain browser like a developer edition or an extended service release. You need to configure | ||
| the path to the browser in the `config/neodymium.properties` file. | ||
|
|
||
| e.g. `neodymium.webDriver.firefox.pathToBrowser = C:/Program Files (x86)/Mozilla Firefox/firefox.exe` | ||
|
|
||
| {{< TODO >}}update link{{< /TODO >}} | ||
|
|
||
| More documentation on the settings within the `config/neodymium.properties` can be found on | ||
| the [Neodymium configuration properties](Neodymium-configuration-properties) page. | ||
|
|
||
| ## Safari WebDriver setup | ||
|
|
||
| Please follow the required steps | ||
| from [Testing with WebDriver in Safari](https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari) | ||
| out of the Apple developer documentation to enable Safari on your Mac. | ||
|
|
||
| Once the Safari WebDriver is available you just need to configure a browser profile within the | ||
| `config\browser.properties` file. This could look like the following profile. | ||
|
|
||
| ```properties | ||
| browserprofile.Safari_1024x768.name=Local Safari 1024x768 | ||
| browserprofile.Safari_1024x768.browser=safari | ||
| browserprofile.Safari_1024x768.screenResolution=1024x768 | ||
| ``` | ||
|
|
||
| ## Tear down | ||
|
|
||
| Normally Neodymium takes care of quitting the WebDriver instances and there is nothing else to do or to worry about. | ||
| Nevertheless, there may be some use and edge cases you need to handle yourself or know what you can do. | ||
|
|
||
| ### KeepBrowserOpen and KeepBrowserOpenOnFailure | ||
|
|
||
| {{< TODO >}}update link{{< /TODO >}} | ||
|
|
||
| Those settings are configured via the [Neodymium configuration properties](Neodymium-configuration-properties). We | ||
| recommend that you only activate these properties for local test development to avoid resource issues within your CI | ||
| environment. | ||
|
|
||
| If those options are activated, the WebDrivers that opened the browsers can't be terminated since this would also result | ||
| in closing the browsers that should stay open. Unfortunately, after you inspected the open browsers and closed them, the | ||
| WebDrivers then stay open. Therefore, you need to quit those processes manually via some kind of task manager or | ||
| interface provided by your operating system. If you restart your system regularly you can probably ignore this, since | ||
| those WebDriver zombie processes will be closed during the normal shutdown routine. | ||
|
|
||
| {{% warning notitle %}} | ||
| **Attention:** use `@KeepBrowserOpen` and `@KeepBrowserOpenOnFailure` with care. The WebDriver won't be close when | ||
| closing the browser and need to be clause manually via some kind of task manager or interface provided by your operating | ||
| system. | ||
| {{% /warning %}} | ||
|
|
||
| ### Reuse of WebDrivers | ||
|
|
||
| {{< TODO >}}update link{{< /TODO >}} | ||
|
|
||
| Another edge case can be the reuse of WebDrivers. The start routine of a browser can take some time especially if they | ||
| are started in a remote test environment. Therefore, it is a good idea to reuse an already instantiated WebDriver. This | ||
| setting can be configured via the [Neodymium configuration properties](Neodymium-configuration-properties). | ||
|
|
||
| Nevertheless, you may want to quit specific WebDrivers for some reason, e.g. prevent side effects from some browser | ||
| state that is not easy to clear or free up resources within the test environment. | ||
|
|
||
| In such cases we provide three ways how such a behaviour can be achieved. | ||
|
|
||
| #### Tear down a specific WebDriver to prevent its reuse | ||
|
|
||
| This function can be used in a `@After` annotated function within a JUnit test case. You can define a specific condition | ||
| that decides whether a WebDriver should be closed or not. | ||
|
|
||
| ```Java | ||
|
|
||
| @AfterEach | ||
| public void after() | ||
| { | ||
| if (someConditionIsFulfilled) | ||
| { | ||
| WebDriverUtils.preventReuseAndTearDown(); | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| #### Clear the cache of a WebDriver available for reuse | ||
|
|
||
| This function can be used within a function of a JUnit test case that is annotated with `@AfterClass` to clear the | ||
| WebDriverCache of the WebDrivers ready for reuse. When no matching WebDriver can be found in the cache, a new one will | ||
| be generated. | ||
|
|
||
| ```Java | ||
|
|
||
| @AfterAll | ||
| public void afterClass() | ||
| { | ||
| WebDriverUtils.quitReusableCachedBrowsers(); | ||
| } | ||
| ``` | ||
|
|
||
| {{% note notitle %}} | ||
| **Attention:** It is safe to run this function during a sequential test execution. It can however have repercussions | ||
| (e.g. longer test duration) in a parallel execution environment. | ||
| {{% /note %}} | ||
|
|
||
| #### Configuring the max reuse setting | ||
|
|
||
| The following two settings need to be configured within the Neodymium configuration e.g. `config/neodymium.properties`. | ||
| Activate the reuse in general and configure the number of reuses. If not specified or set below 1 the driver will be | ||
| reused unlimited times. Setting the property to 1 means that the driver is reused once, so the web driver is used twice | ||
| in total. | ||
|
|
||
| ```properties | ||
| neodymium.webDriver.reuseDriver=true | ||
| neodymium.webDriver.maxReuse=1 | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More about ... needs to be adapted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats the old placeholder I didn't touched this since I don't have a good logo