PL-100 Microsoft Power Platform App Maker – Other topics Part 6
September 3, 2023

13. Running and updating a test in Test Studio

In the previous video. We use Test Studio to create a test. Let’s just have a look at the formulas that we’ve used. I’ve taken what I previously recorded. I have created a global variable number of records before and counting the number of rows. So I can’t use count rows because that might give me an inaccurate figure. I’m using count if instead, then I wanted to keep track of everything. So here’s a trace. But I also want to be notified right now I’m going to do the same at the end. And then I’ve got a test. If the number of records after it equals the number of records before plus one test is successful.

If not, I want to know about it. So what I’m going to do is save and then publish. And then I can click the play. So I will publish my tests and make this version of the app available to anyone who wants it and then play. Make sure you press save first. Okay. Now notice my mouse is over here. So I’m not pressing any buttons at the moment. So a notify has come up telling me that there are 14 rows. Again, I’m not pressing any buttons. So the computer is now going in.

It is setting all of the values as before. Obviously I could edit the formulas if I wanted different values. So it’s now going to finish off setting the number of records. It’s now telling me that there are 15 rows. The assert is successful and we are done. So let’s make it unsuccessful. So now I’m going to say that number of rows is expected to be the number of roles before plus two. But I’m also going to do something else.

I’m going to go into the test here. So I want to be notified when the test is complete. You can also have when the case is started and when the suite is completed. In other words, a series of tests. So I’m going to put in a notify and I can use a variable called test case result. Now, test case result has a lot of properties such as the start and end times, the test case or the test suite description, ID or name, whether it was a success and whether it was failed.

What are the failed assertion was the failure message and any traces that we’ve got. Traces are asserts and trace entry. So it’s not just the trace but it’s also the assert. So I’m going to put in traces and close the bracket. But that’s not sufficient. You can see a squiggly underline. It is expecting a text rather than a table, which is what traces is. So what I’m going to do is convert all of this into a text. And one way, for instance, is to convert it into a format called JSON.

So it’s just a quick way for me to just convert a table into text. So let’s play this again. Now we know that the assertion is going to fail. However, don’t click on this Play button. If you have made changes, you must save first. Now, once you’ve saved, you can click on Play. It will then publish it for you, but it won’t save it for you. Now, notice that there is a Copy Play link button here. So what’s that for? Well, you can test it externally, so different users can then test the same test, run it on different machines. So that’s what that Copy PlayLink is for.

So you can see in this particular test, we start off with 15 rows and so we’re going to go to 16 rows. But my assert is going to fail because it wants 17 rows. So let’s just see what happens. And let’s see what happens at the notify at the end. So there we can see the assertion failed. So it says different number of rows than expected. So the test failed at this step. Assert. So it’s probably useful if you have more than one assert to name them differently. And if you’re not at the top, we have got the notification of the number of roles before, the number of roles after, and the assertion failure.

So when would you use test studio? Well, you should determine which test cases should be automated, repetitive tests, high business impact functionality tests, features that are stable and not undergoing significant change, features that require multiple data sets and manual testing that take significant time and effort. Now, I’d keep test cases small so you can more easily identify the failures. Keep expressions to a single test action. So I would suggest just having one big action per expression per step. Though sometimes, as you can see, I can join two together.

Every test case should have an expected result that you can test. And you should also use suites. So for maintenance, you can group or categorize similar test cases together. And you can also, if I click on the suite and go to the top, you can enter a description for the suite and a description for the case, which is always useful. So Test Studio, what you can do is you can create suites within suites.

There are cases, you can have multiple cases and then you can record your steps. Once you’ve finished recording, then you can put in traces, you can set variables to see what before and afterwards, for instance. And you can then test a conclusion, an assertion using the Assert function.

14. Other Power Platform testing tools, including Monitor

Now, in this video we’re going to have a look at other power platform testing tools. So if I close down this test, you can see that the other thing we’ve got is the monitor. So the monitor, it just keeps a track of what I’m doing. So if I open up the monitor, you have started a new monitor session interactive your app in play mode to monitor its activity. So I’ll do that, I will play, I will click on a button and notice what happens now when I go to the monitor.

So I have got the user interaction, which is a select of button one underscore three using the property on select. But I’ve also got network interactions as well. So I’m getting some roles from Expense and accounts. So if I continue in my app, you can see that it will continue to record what I’m doing and what information is being extracted. So you notice, for instance, when I went into the expense screen, it didn’t actually have to get any more get roles. So you can use this to find out what network interactions are happening. For instance, are they happening at the right time, the time that you’re expecting? Now, you can also use browser tools when you get into power platform more.

So, for instance, in Chrome, which is what I’m in, I can hold down Control and Shift and I to get information about the app that you can see on the screen. And that can be useful for more detailed analysis. If you’re an Edge or Internet Explorer F Twelve does a similar job. And additionally, there is a product called Fiddler, which is, as you can see, a web debugging tool. However, I wouldn’t recommend using Fiddler or Control shift IOF. Twelve at the beginning.

They’re quite advanced in total, I would say. Now, don’t forget, you’ve also got the solution checker. So I can check a particular solution for model driven apps. So in this video we’ve had a look at some other things that we could be using. We could use the monitor that allows me to have a look at what I’m clicking on, what interaction is happening, and I can have a record of that. I can download the information and if I wanted, I can also filter as well and invite Peter to join this monitoring session. And then there are other things you can use, like solution checker and your own browser tools or plugins.

15. Design for accessibility

In this video, we’re going to see how you can design for accessibility in your Canvas apps. Now, we’re going to have reloading in this particular video at the various properties that you can be using. So, the first one I want to talk about is the tab index. You see it right at the bottom. So this allows for keyboard navigation. So if I was playing an app and I press tab, you can see that the computer doesn’t go to every single control. It goes to those which I say should have a tab stop, or at least the computer said that. So I’ve been pressing tab to get from one to another and that’s indicated by this tab index. So you can see that the computer, when it was going all the way down, was doing it in a visual order.

Now, if for some reason it doesn’t do it in a visual order, you might need to rejig things to make it more accessible. Containers can group related content together and the form card and the gallery controls are automatically grouped. So let’s have a look at this tab index. There are two recommended values. Zero means it should have a tab stop. In other words, when you press tab, please stop here. Minus one means don’t stop here. So if a tab index is minus one, it cannot be accessed by keyboard navigation. You noticed when I was tagging through all of that, it didn’t once go onto this red label.

Can you have tab indexes greater than zero? Yes, you can, but it is not recommended as it can break certain screen readers. Now, we’ve also got the visible. So if visible equals false, then again, the control is not included in keyboard navigation and you can’t see it. So how can it be equally? If the display mod is disabled, then it will also not be included in keyboard navigation.

So what if you want it to be available for accessibility purposes, but you don’t actually want anybody to be able to see it to click on it? Well, there are two ways. First of all, you can change the size. So the width or the height, you can change that to say zero or one. Make it really small. Additionally, you can change the color. So if you change the color to something that is invisible, you’re transparent.

Then again, you won’t be able to see it to click on it, but it will still be available for accessibility. Next, I want to look at labels. So there are two things particularly I want to look at and they are in the advanced section. First of all, we have got Live. So what happens when the label changes? Maybe I’ve got a button and the label changes. Well, there are three different settings. First of all, there is off. So the change happens on screen, but the screen reader doesn’t say it.

Then there is polite. So the screen reader just keeps on going, whatever it’s doing and then when it finishes, said there is a change to this assertive is like a news headline. It interrupts what it was doing to say there is a change. So that’s live. And then we’ve got role. What role does this label have? Maybe this role is a heading. It could be a heading one, heading two, heading three or heading four. Alternatively, it could just be default for default text.

So it’s just to help any screen readers interpret the screen. And the last thing I want to talk about in this video is if you’ve got a toggle. So this is an on off and we can set the default to on or off. We can show the label, but I want to talk about the false value and the true value. So this is how the on off gets interpreted not only on the screen, but also by the screen readers.

So in this video, we’ve had a look at various properties that you should design for when designing for accessibility. So we have got the tab index. Are you going to stop there? Zero means yes, minus one means no. We’ve got labels. The live and raw live. Should I say? Any changes? Role. What sort of role is there? And for Toggles, we have got the false text and true text. So the screen turf can say that this toggle is set to own, for instance.

Leave a Reply

How It Works

img
Step 1. Choose Exam
on ExamLabs
Download IT Exams Questions & Answers
img
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates real exam environment
img
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!