Test scenarios for QingStor SDKs.
We need to make sure that our QingStor SDKs are working properly, and to ensure their functional consistency. So we use scenario testing. Scenario testing is a software testing activity that uses scenarios: hypothetical stories to help the tester work through a complex problem or test system.
Cucumber is a tool that supports Behaviour-Driven Development (BDD), and can be used for our test. It executes executable specifications written in plain language and produces reports indicating whether the software behaves according to the specification or not.
Test scenarios are described in .feature
files. Every .feature
file conventionally consists of a single feature, and every feature may have several scenarios.
Scenario Example:
# PUT Bucket
Scenario: create the bucket
When put bucket
Then put bucket status code is 201
Given these test scenarios, each SDK could implement the same test flow. Finally, running the test flow against the given features to check whether the SDK is right.
Running Test in Ruby SDK:
$ cd test
$ cucumber --backtrace --require="./" ./features
...
38 scenarios (38 passed)
84 steps (84 passed)
0m7.934s
- Fork it ( https://github.com/qingstor/qingstor-sdk-test-scenarios/fork )
- Create your feature branch (
git checkout -b new-feature
) - Commit your changes (
git commit -asm 'Add some feature'
) - Push to the branch (
git push origin new-feature
) - Create a new Pull Request