logo

NJP

Creating and Scheduling Test in ATF: ATF Walkthrough #2

Import · Apr 09, 2024 · video

okay nice hello everyone U my name is Amanda SS and I have oinka here today and we will be covering the second part of the series creating and scheduling test in ATF um if you haven't checked out the first few um series getting started in ATF I do recommend to check that out um but we'll start with a little bit of introductions before diving in um so my name is Amanda SS and I am a technical consultant under impact um and what I do we we work under impact we provide these services to customers um just to kind of help them get enabled in any products of interest and then L if you'd like to introduce yourself yeah um hi everyone um nice to meet you again so I'm I'm the senior outbound product manager for Elm and everything on ATF so you can always reach out to me if you need help nice so I will get into the agenda but we'll just this quick save heart slide before moving forward um and then as for today's agenda we will be covering new updates as far as ATF so everything in the Washington release um so we we'll be covering using ATF test steps test Creations how to schedule your test and then we will move on to the demo and show you kind of where to find and navigate to these in your instance okay um so as far as ATF it has something called test steps these are the pretty much the building blocks to your ATF test because it's specifically the actions that would need to be executed in order for ATF to kind of know what to do um so for example when you're impersonating a user if you want to click some type of button and so on these are all called test steps and what server style has done is they have created a very long list of something that we called Step configurations so you don't really need to script any of these actions that you would like to execute it's very simple as selecting which action that you need and dragging that onto your ATF test and the entire goal is that it allows you to stimulate user actions and interactions within the application so that when you are testing it can help you to identify any issues when you're for example developing or um before and after upgrades just because there are some changes made there a lot of these steps they can take in some input as well as um return output so for example if you want to fill out a form that would be an example of one of the steps it can take in some input called variables so how exactly would you like to fill out these fields um and for example you can also use some of those inputs as outputs um just to help your test kind of be a little bit more Dynamic and not really static um as far as the outof boox test steps that we do have this is a long list of all of those test steps so they're invited divided up into some of these categories and then within each of those categories you're able to kind of see what the available test steps are um and you're also able to filter that as well to kind of look through something more specific um in addition to that if there is some type of functionality that you don't necessarily see here you do also have the option to create your own custom test step um one thing to keep in mind is that that does require some scripting experience but when you do kind of navigate to that module to create your own test steps there is some example code that is scripted out so you don't necessarily need to worry about um if you're completely on your own when it comes to building that custom test there's some examples on how to kind of capture that input variables um log the status and things of that sort so I do recommend take advantage of the the custom code commented out and also take advantage of the outof box code that's already here because you are able to use this as inspiration if you need to build some type of custom functionality um as far as the different test creation methods um so before you do get into building your actual test it is important to kind of consult the developers who have rebuilt the customizations and also your users just because you do need to know what types of actions to execute and as well as what type of things to test um we do recommend testing just customizations or configuration changes in your instance there isn't really a need to test anything out of the box that you didn't change because that's something that service now will already test for you um with these major releases um so you don't need to necessarily test anything out of the box um with that in mind here are the three different different methods that you can go about when creating your test um so we have the first one here manual test uh or manually add your test steps um so this one it is a little bit more on the timec consuming side in the initial phase and this is because you kind of have to map everything out from start to finish um and essentially you'll be creating those tests from scratch so this will be a little bit timeconsuming on the front end but once you do have those tests built out they're there for you to reuse use as templates and rerun so again a big curve in the beginning but it's very easy to run your test once everything's created if you do decide to go the manual route um we also have modify quick start test this one is a lot quicker than manually creating every test and I do recommend kind of um looking for this before you decide you want to create a manual test and this is because a lot of the steps are already preconfigured for you and the only thing that you need to do is um replace the demo data with your actual instance data in order for the test to pass um and there's also a lot of use cases here as well um so this just saves you the time from having to figure out what types of things to test because we're able to take a look at this um and then the last one this is the quickest method and also one of the newer functionalities to ATF um as of the Tokyo release and this is using test generator um so we will cover this in more detail in one of the later steps or later videos in this series but essentially what this does is it uses Ai and also analyzes your instance Behavior workflows um to generate um tests for you there is some limitations on what types of tests that this can build it can only build um as of now form and service catalog test um so anything outside of form or service catalog test you will have to kind of resort to some of these other methods like using quick start test this does extend the the functionality of that or manually making your test if you're not able to find anything pre-built and predefined for you and the last slide before step into the demo is more on scheduling those tests so you do have the option to schedule those tests um and this is really nice because you can have them regularly scheduled on a certain Cadence you can do things like daily weekly or for example let's say you do your upgrades kind of um outside of business hours and you want to run them at let's say 2 or 3:00 a.m. and have that upgrade and test result ready for you by the time you um log on for work that day you're able to do so here um so with the schedules you're able to add any type of test or Suite um there is not a limitation to this but keep in mind um depending on if you're running your tested the cloud or using the client test Runner um keep in mind kind of the time that it takes to test if you are using the client test runner for example make sure you do have a browser that can stay open um for throughout the duration of this test run in order for it to successfully execute okay that is all I have so we'll kick it over to the demo hey all right so I'm going to share my screen now so we can work through the various um ways you can create a test so schedu your test now um I think the first I'm going to go through that um talked about is manually adding your test steps so now I'm going toate to I already have ATF as one of my favorite in my instance to the live demos so so what you get to experience is what happens in your life some reason this is more refreshing okay so um I'm going to walk straight to or navigate straight to test then from here we can and see um the test that is on my instance within the global package so for the first steps the first thing to do is go to the name the top right corner um while you're there you can write the name of your test there for example we will call this one walk through walk through series series test and um all these are checked on by default active means that um you can actually use this test or run this test when you want then F on server error this is also a default um option to check um if you want to enable parameterized testing this we're going Talk cover this later in the series then you can also insert a description we always advise um our customers to always add a description so it helps the team members understand what this test is all about so this is simple enough because I I just want to go over this and um once you're done with creating the the test name and adding description the main step for this um test creation method is to go to add test steps um so here here is where you you see all the test step I was talking about earlier I she mentioned One Way um let's say for example you want to um create maybe a scripted um test step on your own that's one of the most difficult but let's go there first I won't do that now I'll just show you how to get the test step so I'll just go to Custom Custom okay okay yeah this this part one this is um the test step where if you have um a CL script you want to insert to create your own custom step configuration this is where you come to but uh let's go to the simple one um see for example we want to create a new user click on this next so like amand said some of these steps allow you to insert variable and also um output the VAR as you may like so here um the first one is we're going to use um use this notes to insert whatever description write create a new user you can always you don't have to this this is just um trying to check all the boxes um let's say user onour is let's say Dave Le I like using da every time and I use da Ram z um the field see for example we need to fi in the Ben Let's see we want to add um email address or phone number okay let's do phone number add this and you can also set the rules let's say you want to give it a r um let's try use the ATF test designer Pi this Ro you can also group the user as you like I don't know what group to use right now gr that me okay let's that we can leave that for now um also um with this create a new user you also get a check box that tells you okay do you want do you want to impersonate this user so this impersonation is what sends out the first name and the Las name variable to the nextest step so I'm going to submit this and to that here as our first test step within this test then I'm going to do a second test step that takes in the output of this first one um let say for example I want to insert a record and for me to insert a record I need to user to insert a record okay so executional is number two it means it's going to come next after the the first one we created the create a new user so this takes um the the variable we created oh no sorry I me to field so here um this choose field it picks in it picks the the user we created earlier and let's say for example you want to add um I don't know add cost Cent or something like that you add a name or a number 9176 and submit so the whole point of this particular um step is that it takes in the user you created in the first test step and use it for the next one which is the record in set so this is the first um U method of creating test or creating the test within ATF uh with this you can copy the test you can run the test the way you like but right now this the test are not complete so for you to run the test you need to have a complete test step for the scenario want to test within your um within ATF and also this tab also you can see this tab brings up the test results once you don't run the test you can come to this tab and analyze what's what happened within your test if your test was successful or not and what what the issue within your test was something like that and you can also add breakpoint break point means like you want want to debug your test and you want to basically understand what each steps what the output of which steps are actually producing basically so um I'm going to move on to the next um method of creating a test with an ATF which is the Quick Start test now like Amanda also mentioned earlier this test are the templates that that come with ATF within service now so the whole point is that we're trying to help you get started like find um get um something to work with when you get your instance or when you're trying to start using ATF this ensures that you have um no friction or less friction in using ATF or understanding ATF I think one also I didn't mention also is that aside from adding test you can also add test template that that has been created already um from here if you I think we have something called test template and we didn't test template these are different kind of test or different kind of test steps that have been modified to actually help you um perform or do your test better on ATF so with this test template can also have test within your your your your test um so I'll go to Quick Start test now and what you can what you can see from Quick Start test is that you within the active column you see that all the test are false and this is because um they um we don't expect you to run them directly the whole point of Quick Start test is you can copy them and run them the way you like how you want so um let's say we want to work with um this first one assessment call and within assessment call you can see that this test already comes with four um test already and within this test itself there are t steps within there this this helps you like get started like this helps you remove the major B of manually creating your own test yourself so um I'm go back this test suit you get four um additional tests that are us the test suit and what we usually advise our customer is to copy the test before they try to use it so when copy this test you can then modify it the way you want click it I've clicked on copy right now so copying makes me have like a local copy of my instance which I can modify now this is the one and you see it actually right now which means you can actually use them and let's say for example also you have some test you've created within this um application of that also within this assessment code you can um add futter condition to bring in more testing like with this you can say you want to search for test with keywords that St B assessment so with this you to add all the test that has assessment within them yeah in the test sheet let's close that for now um so once you're done copying you can come to the test and modify them way you want like said this data the data you have test um St shs are usually demo data so we expect that you modify them to your own um to the data you want your own choice the way you want it so once you're done modifying you can always update so you ensure that your your updates are saved or your changes are saved then you can run them when you uh put into when you want to and then next one I'm going to talk about is how to create test with test generator we're going to go into more detail later with the series but I just want to show you what is expected when it comes to running I just test sorry so um the the last method the last testation method like I mentioned earlier is what we call the test generator and with this this saves you like all the stress of trying to create your test yourself so um just one one thing to not is that um for now the testator is limited to um service catalog and and what's the next one is it and form test and forms yeah and form test so um right now we are limiting this test generators to that um later once we have more functionality we're going to let you guys know more um this is where you have from test and service cataloges so for example let's say you want do service cataloges you can specify a scope or just decide to go with scope um specific catalog items um let's say apple H trade what we're interested in we could say we want 100 100 test and maximum test per count test count per item can leave it like that but one thing that's very important here is to also add your email so we would do Dave Dave Ramsey add service now so once you have all this figure once you have all this inputed you can just go to submit right now I didn't configure my instance for for for this so that's why um the submit button is not working so that's all about test generator um I think the next one I'm supposed to talk about is um out schedule testing ATF this is just simple and straightforward so for um Shing test in ATF um there's e there is a a button for it's also on the n Bar you go to Shadow and you can either modify the this is one I have already so let's go to a new one um I'll just call this my new walk through walk through schedule and um this I can decide to say on on this test every week always on Fridays at this time save then the next thing is to all to now add the test sh I want to um schedule the test I want to run at this time um you can also use this place to specify the browser you want to work on and the OS you can decide to specify that also so uh here I'm going to search for the test or I could just okay I'll just look for assessment we have the assessment call the one we copyed then um submit submitting this button ensures that like helps you see say okay you're done um editing the the shadow suit and this is where this is when you want it to run and I think one other thing also is um if you later on decide to let's say you want to modify or change when the test should run you can always go back to your sech shedule and um edit the date or edit the name so um I is there anything you want to add to all this um this was pretty much it the only thing I already mentioned this in the slides but with the schedules there isn't a limit but just keep in mind how long um everything is going to take to run if you do add like for example 100 test you need to make sure that either using the cloud Runner so all of those can run or you have a client test Runner that's able to um stay open for the right amount of time to execute all the tests okay yeah all right so um I I think we have a couple of best practice on the the so go with that yep so I will share my screen and end with those best practices okay so the first one we have be aware of dependencies between the test and the Suites um so this is more for like we kind of mentioned earlier some of those variables can store some output um so you do need to make sure if you are using a suite you kind of have everything especially if something is dependent you have the right execution order set out or you will get some of those failures in that test Speed Run um as far as the next one before using quick start Suites ensure that the necessary plugins are installed um so like we mentioned I think in the first video these all of the quick start tests are dependent on applications um so the ones that you already see in your instance it's because you have the necessary applications installed but you do have the option to go to the store and install any other quick start test that might best fit your needs but in order for those to properly run you do need to either make sure the right applications are installed or if you want to kind of use it for something else just make sure that you kind of reflect that we put your actual instance data in the test for it to successfully pass um next one document any specific configurations so this is really big you want to make sure that you're Consulting the developers because they are the ones who are making the customization and you need to know exactly what was changed so that you can properly test those using ATF next one the next two are kind of related but this is more on quick start tests um do recommend to copy them and as you may have already seen when you do open up those quick start tests they all have protection policies on them and this is because for um updates for major releases we are making updates to those quick start tests so we want to make sure that you receive those updates and that's why we recommend kind of just copy those and don't modify the original quick start test um because when you do upgrade for example you do have that option um to revert back to um base system and so that you're able to kind of see the new updates that were added to the quick start test all right but that is the last slide are there any other best practices you wanted to add yeah that's open now okay nice that is everything we have all right so um thanks guys for joining or for watching this um we will provide more content that would help you better use ATF and also have the best time to Value when it comes to use an ATF thank you thanks everyone

View original source

https://www.youtube.com/watch?v=fVfjpgOheTw