Behavior Driven Development and Testing
- f Qt and QML applications
Behavior Driven Development and Testing of Qt and QML applications - - PowerPoint PPT Presentation
Behavior Driven Development and Testing of Qt and QML applications Qt Developer Days 2014 by Reginald Stadlbauer About me Name: Reginald Stadlbauer Company: froglogic GmbH Position: co-founder and CEO Worked as Software Engineer
Feature: Feature: Valid conversion Scenario: Scenario: Convert meter in centimeter Given Given the Unit Converter is running When When I enter 378.9 And And choose to convert from "m" And And choose to convert to "cm" And And click Convert Then Then 37890 should be displayed in the result field
Feature: Feature: Invalid conversion Scenario: Scenario: Mix units Given Given the Unit Converter is running When When I enter 378.9 And And choose to convert from "m" And And choose to convert to "kg" And And click Convert Then Then ERROR should be displayed in the result field And And "Unit type mismatch: Length vs. Weight." should be displayed in red
Test.feature Test.feature Feature: Feature: Valid conversion Scenario: Scenario: Convert meter in centimeter Given Given the Unit Converter is running When When I enter 378.9 .... Test.py Test.py
@Step("Given the Unit Converter is running") def step step(context): test.warning("Implement me”) @Step("When I enter 378.9") def step step(context): test.warning("Implement me”)
Test.feature Test.feature Feature: Feature: Valid conversion Scenario: Scenario: Convert meter in centimeter Given Given the Unit Converter is running When When I enter 378.9 .... Test.py Test.py
@Step("Given the Unit Converter is running") def step step(context): [...] @Step("When I enter 378.9") def step step(context): [...]
Test.py Test.py
@Step("Given the Unit Converter is running") def step step(context): startApplication("UnitConverter”) @Step("When I enter 378.9") def step step(context): click("FromField”) typeText("378.9”)