Introduce testing standard/approach #1491
Replies: 8 comments 2 replies
-
Good stuff @danielbate! 🚀 Somewhat related, we also have this: We can resume the work on it now that #984 was merged. Here's the spec from the last attempt: |
Beta Was this translation helpful? Give feedback.
-
Good point @arboleya! Will add a task for just that. |
Beta Was this translation helpful? Give feedback.
-
Do you mean other than the #284? |
Beta Was this translation helpful? Give feedback.
-
Apologies, I will not be writing any more issues but I will be using the above task list as a reference to track changes made to bring us closer to adhering to the above standards. So I just meant that I will add another task to the above list, that references #284. |
Beta Was this translation helpful? Give feedback.
-
The above requires updating due to further developments, however this is a good classification from @arboleya that will insight the specification:
|
Beta Was this translation helpful? Give feedback.
-
Here's how these tests could be spread in directories: <package-name>
├── src
│ ├── index.test.ts # This would be a unit
│ └── index.ts
└── test
├── e2e
├── feature
├── fixtures
├── integration
└── utils I ended up with It worked great, and I think all packages should segregate their tests. This goes back to maybe re-distributing all tests from inside
One thing that could work is:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Closing discussion as we've concluded discussions |
Beta Was this translation helpful? Give feedback.
-
As we approach mainnet, it is important we start to implement some stricter testing standards that ensures parity with the protocol/FuelVM and gives us the greatest level of confidence in the changes we are making as uptake in the SDK increases. Additionally, we can consolidate and structure our testing to give greater clarity as to what behaviours we are currently supporting. I would like to propose some MoSCoW testing standards as well as a roadmap of changes to bring the current SDK in line with the standards.
Where we are now
fuel-gauge
for feature and integration level testingforc
projects for testsProposed standards
utils
packagesGiven X, When Y, Then Z
- for unit tests onlywhen
andthen
are usually required as thegiven
is our service under test. We can then utilise theit()
syntax for unit tests andtest()
syntax for feature and integration tests)master
(coverage level TBD)Tasks (TBD)
browser compatibility
#284This should bring greater clarity to the behaviours supported by the SDK, give greater confidence in the quality of our tests and increase overall coverage as discussed in #753 . All standards and tasks are up for discussion and I would appreciate any insights 😃
Beta Was this translation helpful? Give feedback.
All reactions