Skip to content
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

Document how to replace usernames in acceptance tests #2676

Merged
merged 1 commit into from
Jun 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions modules/developer_manual/pages/testing/acceptance-tests.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,61 @@ make test-acceptance-api BEHAT_SUITE=apiTags BEHAT_FILTER_TAGS=@skip
make test-acceptance-cli BEHAT_SUITE=cliProvisioning BEHAT_FILTER_TAGS=@skip
----

=== Running Acceptance Tests for different User Names and User Attributes


The user names and user attributes in test scenarios can be replaced at run-time.
This allows running the acceptance test suites with different unusual user names, display names,
email addresses and passwords. This can be useful for finding values that cause problems.

The replacement values are defined in `tests/acceptance/usernames.json`. Edit that file
and specify the values to be used at run time. For example:

[source,bash]
----
{
"Alice": {
"username": "000",
"displayname": "0.0",
"email": "zero@example.org",
"password": "0123"
},
"Brian": {
"username": "1.1",
"displayname": "नेपाली name",
"email": "nepal@example.org",
"password": "नेपाल"
},
"Carol": {
"username": "12E3",
"displayname": "12 thousand",
"email": "twelve-thousand@example.org",
"password": "random12000"
},
"David": {
"username": "123@someone",
"displayname": "321@nobody",
"email": "someone@example.org",
"password": "some123one"
},
"Emily": {
"username": "e+f",
"displayname": "a+b-c*d",
"email": "emily+fred@example.org",
"password": "notsorandom"
}
}
----

Then define the environment variable `REPLACE_USERNAMES` to be true:

[source,bash]
----
export REPLACE_USERNAMES=true
----

When you run acceptance tests, the user names and attributes will be replaced.

=== Displaying the ownCloud Log


Expand Down