[Feature]: BDD and Test Engine Example
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- testing-qa
Research direction
Start by reviewing the existing TestEngine, TestSettings, and ExecuteAndReturn APIs, then compare the requested SpecFlow/Reqnroll Gherkin example with the repository's current test flow. Define the NuGet package integration and the required step behavior; done means the example can execute the shown login scenario through the Test Engine.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
Would like to create BDD style test using Power App Test Engine
Describe the solution you'd like
Create a Gherkin test using Specflow/Reqnroll.
For example as Specflow test something similar to
Feature: Login
Scenario: Successful login
Given the user profile "user1" navigates power app named "MyTest"
Then the user should be redirected to the dashboard
Exend Test Engine as a NuGet package and extend the ability
using TechTalk.SpecFlow;
using Microsoft.PowerApps.TestEngine;
namespace SpecflowPowerAppsExample
{
[Binding]
public class LoginSteps
{
private readonly TestEngine _testEngine;
public LoginSteps()
{
_testEngine = new TestEngine();
}
[Given(@"the user profile ""(.*)"" navigates power app named ""(.*)""")]
public void GivenTheUserProfileNavigatesPowerAppNamed(string userProfile, string appName)
{
_testEngine.TestSettings.Profile = userProfile1;
_testEngine.TestSettings.AppName = appName;
}
[Then(@"the user should be redirected to the dashboard")]
public void ThenTheUserShouldBeRedirectedToTheDashboard()
{
var powerFxSteps = new List<string>
{
"Set(CurrentPage, 'Dashboard')",
"Validate(CurrentPage == 'Dashboard')"
};
foreach (var step in powerFxSteps)
{
var result = _testEngine.ExecuteAndReturn(step);
Assert.IsTrue(result.Contains("true"), $"Step '{step}' failed.");
}
}
}
}
Describe alternatives you've considered
No response
Additional context?
No response
- Dominant language
- C#
- Stars
- 150
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/PowerApps-TestEngine
-
SimulateDataverse tries to replace HTTPS/1.1 when it should be HTTP/1.1Possibly taken @jensotto claimed this 316 days ago. Opennew
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
new
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
new
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
question
Difficulty 5/5 Over a week Newbie friendliness 20/100
All issues in microsoft/PowerApps-TestEngine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Volodymyr-Petrunin/Bankomaten#45 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AvaloniaUI/Avalonia#22420 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
dotnet/SqlClient#4823 · 1 comment ·
Maintainers usually reply within 2 days
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area-testing p1-recommended
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day