Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Feature]: BDD and Test Engine Example

Aperta
#531 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
testing-qa

Direzione di ricerca

Inizia esaminando le API esistenti TestEngine, TestSettings ed ExecuteAndReturn, quindi confronta l’esempio Gherkin SpecFlow/Reqnroll richiesto con il flusso di test attuale del repository. Definisci l’integrazione del pacchetto NuGet e il comportamento richiesto dei passaggi; il lavoro è completato quando l’esempio può eseguire lo scenario di accesso mostrato tramite il Test Engine.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C#
Stelle
150
Fork
56
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/PowerApps-TestEngine

Tutte le issue di microsoft/PowerApps-TestEngine

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.