The PowerShell component of ExcelBDD was released on June 12. See< ExcelBDD is open source! And PowerShell ExcelBDD release>,
On 14 June, as described above ExcelBDD open source agile project launched! And introduce Microsoft Agile+DevOps free platform - dev.azure com.
The first version of excelbdd Java open source component has been released. The latest version number is 0.3.0, which is available in search maven. Org can just be found. Maven imports the following statements
<dependency> <groupId>com.excelbdd</groupId> <artifactId>excelbdd-java</artifactId> <version>0.1.4</version> </dependency>
Previous article( Use Excel BDD to express typical user stories )The scenarios and corresponding codes to be solved have been introduced. Combined with this release, a column in Cucumber is displayed. As a comparison, see how ExcelBDD solves it. The Feature file of the example is as follows:
Feature: Is it Friday yet? Everybody wants to know when it's Friday Scenario: Sunday isn't Friday Given today is Sunday When I ask whether it's Friday yet Then I should be told "Nope"
Above from Cucumber
Press ExcelBDD to rewrite as follows
Then, use the excelbdd Java gadget to read from it. The Junit5 example is as follows
static Stream<Map<String, String>> provideExampleList() { String filePath = TestWizard.getExcelBDDStartPath("TestData") + "TestData\\src\\test\\resources\\kq\\testdata\\excel.xlsx"; return Behavior.getExampleSteam(filePath, "WeekDayCheck"); } @ParameterizedTest(name = "#{index} - Test with Map : {0}") @MethodSource("provideExampleList") final void test(Map<String, String> mapParams) { String actualAnswer; if(mapParams.get("Day").equals(mapParams.get("DayOfWeek"))){ actualAnswer = "Yup"; }else{ actualAnswer = "Nope"; } assertEquals(mapParams.get("Answer"), actualAnswer); }
Compared with Cucumber, Cucumber needs to write the corresponding StepDefiniton for each row of GWT. ExcelBDD encapsulates all the parameters in the Map without writing StepDefiniton. No matter how many parameters are added later, they can be obtained directly from the Map. Just take the value directly and write the comparison logic. The number of code lines related to the above retrieval shall not exceed 8 lines.
Cucumber needs to define variables and set variables first. Many preparations need to be completed manually before comparing logic. Although cucumber provides sample code, it still needs several manual steps to deal with it. With the increase of GWT steps, the number of lines of code for fetching and setting variables also increases. Each step requires at least 3 lines, and a normal scenario requires about 30 lines of code to fetch.
Of course, the more important thing is not to restrict product managers because of Gherkin syntax. Excel supports multiple formats, colors, hyperlinks, etc., and supports carrying pictures.
When expanding a case, you do not need to change the code. You can add more scenarios in Excel, such as the following:
The above code does not need to be changed. The test results of three groups of data are obtained by execution, as shown in the following example.
Finally, the release of excelbdd Java is still in its early stage and its usage is not large. Write this article to let you know that if it can be used early, it can be optimized better combined with feedback.
Welcome to try.
At present, this open source project only provides gadgets in Java and PowerShell. There is a shortage of people in both new and old languages, as well as documents. Continue to recruit open source volunteers, click the original link to learn more, and those interested can scan the code to contact me.
The expected benefits of joining this project: operating agile and DevOps, mastering product analysis, BDD and TDD. Ready made benefits: free access to various cases, teaching materials, articles and codes on Xinben agile planet. At present, the above has accumulated to about 700. The agile practice from IT to business and the actual situation of DevOps construction provide the most vivid real cases and many sets of agile DevOps teaching materials.
(Xinben agile planet records the agile practice from IT to business and the actual situation of DevOps construction, providing the most vivid real cases. Some members also ask and answer questions based on the practice, and the star owner provides remote coach consulting services. At present, the accumulated content includes a full set of agile project management textbooks, ScrumBan Xinben edition, demand flow model and DevOps specific solutions.)