Learning Playground

Welcome to the learning playground a space to try interactive concepts related to Power Fx and testing. You can use the steps of each playground task to explore different key concepts.

Once have completed each set of learning playground concepts have a look at related learning playground tasks to build your knowledge.

Introduction to Assert() Function

Learn how to use the Assert() function in Power Apps Test Engine to validate conditions in your test.

Results

Playground Steps

You can try the following to experiment with this playground task:

  • Press "Try It!" to verify that the test run and returns a value of true
  • Change the value of Label1.Text from Heading to Heading2 in the SetProperty
  • Change the text to th following

    <pre> // File: text.pa.yaml Controls: Input1: Value: "World" Label1: Text: ="Hello " & text // Code: Assert(Label1.Text="Hello World"); SetProperty(Input1.Value, "Today"); Assert(Label1.Text="Hello Today"); </pre>

  • Press "Try It!" and see the error result