Introduction to lettuce software
Lettuce is another behavior-driven automation tool based on Cucumber and Python. Lettuce focuses on common tasks that characterize behavior-driven development. Not only is it easy to use, but it can make the entire testing process smoother and even more fun.
Advantages of lettuce software
Similar to other BDD testing frameworks, Lettuce allows developers to create multiple scenarios and use simple natural language to describe different functions.
Based on similar specification formats, development and QA teams can coordinate and collaborate.
For black box testing, Lettuce is very suitable for behavior-driven test cases.
lettuce instructions for use
1. pip install lettuce installed under Python2.7
2. py -3 –m pip install lettuce installed under Python3
3. Execution: Go to the superior directory of the feature, execute cmd, then execute lettuce, and press Enter
4. Behavior-driven: Each natural language corresponds to a case; generally used in agile development. The advantage is that there is a connection between all test cases and natural language, and you can clearly see the results of each test case execution.
5. Test case explanation written in natural language
6. Basic ideas of behavior-driven:
(1) Get data
(2) Call the test method with test data
(3) Assert whether the test results are consistent with the expected results
7. Some special processing in behavior drivers implemented using classes
(1) exclude = ['set_number', 'get_number'] defines which methods do not need to be executed
(2) def _assert_number_is(self, expected, msg="Got %d"): Private methods are not test steps by default
(3) step.hashes can automatically obtain data in tabular form defined through natural language, and returns a list
(4) If the feature file is in Chinese, you must add this # language: zh-CN
lettuce update log
The developer of GG said that there are really no bugs this time~
Huajun editor recommends:
Lettuce is one of the best software in the industry. I believe that many friends will have used it. If you don’t use it anymore, you will be OUT. This site also prepares for youDebian For Linux,COSCO Kirin iAudit operation and maintenance audit system centos7 installation package,Nut Cloud (32bit) For Linux,Nut Cloud (64bit) For Linux,7-Zip
it works
it works
it works