Fitnesse test series-how to set up SetUp files
It has been pulled out to write Fitnesse use cases for a period of time, and now case has been writing for a few weeks, and we will sort it out together recently.
The SetUp page is mainly used by me to set environment variables.
Setting of environment variables:
! note this part is included in the write test step and is currently mainly used to define user scenarios.
! note for example:
! note 1, user 1 ($USERNAME_A) registers the account with the password (${PASSWORD_A})
! note the following is the code
! define topic_name {kindle}
! define USERNAME_A {tester001}
! define PASSWORD_A {test}
! define USERNAME_B {tester002}
! define PASSWORD_B {test}
! note is defined primarily for conversion in js code, because js does not recognize the static variables defined in Define above.
! note and creator_user can be changed at any time according to changes in the current test scenario, independent of how the data is named.
! note the following is the code
| | Table:smartrics.rest.fitnesse.fixture.RestFixture | ${SITE} |
| | let | creator_user | js | "${USERNAME_A}" | |
| | let | creator_pw | js | "${PASSWORD_A}" | |
| | let | member_user | js | "${USERNAME_B}" | |
| | let | member_pw | js | "${PASSWORD_B}" | |
| | let | topic_name | js | "${topic_name}" | |
After this definition, when the test data changes, you can modify the definition data of the define part, and the let part can be changed accordingly, which is convenient and fast.