I was also drawn to write fitnesse use cases for a period of time. Now I have written the case for a few weeks, and I have learned a little bit about it. I will sort it out recently.
The Setup page is mainly used for setting environment variables.
Environment variable settings:
! Note is used to include in the write test steps to define user scenarios.
! Note for Example
! Note 1: User 1 ($ username_a) registers for an account and the password is ($ {password_a })
! The following code is used:
! Define topic_name {Kindle}
! Define username_a {tester001}
! Define password_a {test}
! Define username_ B {tester002}
! Define password_ B {test}
! Note: The definition of this part is mainly used for conversion in JS Code, because JS cannot identify the static variables defined in define mode above.
! In addition, the creator_user statement can be changed at any time based on changes in the current test scenario and is independent of how the data is named. The following code is used:
| 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}" |
This article is from the blog "How fast can we make life free". For more information, contact the author!