Is there any solution, tool or framework to build a test automation project with Behavior Driven Development (BDD) approach for windows desktop application?
Asked
Active
Viewed 725 times
1
-
What language do you use? – Old Fox Oct 01 '18 at 15:18
-
I prefer ruby for it but it also could be C# or something else. It depends on solution options. – buurkeey Oct 02 '18 at 10:18
-
As I know all the possible solutions are based on mixing between the following engines; Test runners, Gherkins parser and UI interaction FW/Win API. This the case in C/++/#, Java, Python. I don't know ruby and it's FW, but I believe that it is the same case... I can post an answer about the tools we have been used when I was in the .net world for doing such a tests. – Old Fox Oct 02 '18 at 12:24
-
I've used [pywinauto](https://github.com/pywinauto/pywinauto) in Video desktop (Win) player test automation. Works like a charm, easy to setup and use. Integrating it with BDD, such as Behave. – ekostadinov Oct 03 '18 at 13:36
-
SpecFlow for C# – Denis Koreyba Oct 08 '18 at 08:33
-
@DenisKoreyba is it working for winforms or desktop applications? Have you experienced it? – buurkeey Oct 08 '18 at 12:53
-
@buurkeey it is actually not connected - you use SpecFlow with any other technology you want. You can use it with MS test or with nUnit. You can use it with Selenium, TestStack.White, Coded UI or what ever you want. I used it with TestStack.White but again, it doesn't matter. Yes, you can use it for Automation of a desktop app. It's much more valuable what framework you'll choose to automate your app. – Denis Koreyba Oct 08 '18 at 13:00
1 Answers
-1
AFAIK most of the BDD frameworks falls under unit/whitebox testing framework, provides you a way to author test in BDD, providing step implementation and runner. What you are looking for is black box testing which requires to integrate unit test framework with respective tool/library/framework for example Selenium for web, Appium for mobile. Appium also started support for Windows. So you can check if it satisfies your need.
If that is the case you can use QAF which provides all you need for black box testing of web, mobile or web-services including:
- Integration with TestNG (popular Java unit testing framework) and selenium, Appium.
- Test authoring BDD or Keyword driven or Coded
- Detailed Reporting
- And many more.
All you need to start locating elements and write bdd using inbuilt steps for selenium and appium like:
Given send keys 'some text' into 'my.textbox'
when click on 'button.element'
Then verify 'another.element' is present
And verify 'another.element' text is 'some text'

user861594
- 5,733
- 3
- 29
- 45
-
The statement "most of the BDD frameworks falls under unit/whitebox" is false. BDD does not dictate whitebox/blackbox. There are plenty of frameworks that allow one to write Gherkin to execute Selenium or Appium commands. Wikipedia: "This definition is rather non-specific in that it allows tests in terms of high-level software requirements, low-level technical details or anything in between." – afilina Sep 02 '21 at 20:08