Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Feature]: BDD and Test Engine Example

Open
#531 0 comments 1 reaction 0 assignees View on GitHub

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

enhancement
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/PowerApps-TestEngine

All issues in microsoft/PowerApps-TestEngine

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.