logo

NJP

Automated Testing: Knowledge Quick Start Tests

Import · Oct 19, 2023 · video

[Music] hey everyone it's Justin thank you for watching and welcome to my house in this video I want to talk to you about a bigger topic quick start tests that are part of the automated testing framework and I'm going to focus on it using the Vancouver release that announced there new quick start test available for Knowledge Management so a little background I've been seeing these quick start tests show up in the past couple of releases maybe starting with San Diego when I started really tracking these and I've always had on my list to play with and check and I just haven't got around to it so this week we're going to try it out Knowledge Management is something I'm very familiar with so this should be pretty straightforward so um I'm just going to do this with you I've done a little bit of research um but that's about it so I'm going to hop over to the automated testing framework menu that just disappeared uh there it is automated test framework and I'm going to go to Quick Start Suites now I did install the Knowledge Management Advanced plug-in before starting this because before I didn't have a quick start suite for Knowledge Management but once I installed the advanced installer I got the quick start Suite so let's hop over there and take a look at what that looks like so I've got km or Knowledge Management it is set to not active and you can see everything that it does there I'm I click on Knowledge Management Open this quick start Suite again I've never done this before never played with it can see I'm in the wrong application scope so let's go out of Justin's house into the global application scope um looks like it's still disabled um in fact I need to enable running tests and Suites entirely but let's take a look at this real quick um the description is there but let's see these test Suites create and edit a knowledge article from feedback task form article level subscription knowledge based level subscription okay okay this seems pretty legit has an execution order let's just open one of these uh create and edited article from the feedback task form oh my this is pretty involved uh updates a record opens a service portal page clicks a button wow we can do that they can click buttons queries some records opens existing record and confirms that UI actions are visible holy macaroni um I could definitely use this for some of my applications uh form standard UI table timeout 5 Seconds step config UI action visibility this is pretty cool okay let's actually do this I just want to run through this now um so let's go back out here it says running test and test Suites is disabled enable test and test Suite execution here um okay so I've got a property the default value is false so that test don't accidentally run on production systems oh I like that okay got my seal of approval there click yes to that enabled scheduled test Suite execution yeah I don't really need that um debugging okay I'm going to leave the rest of this alone we'll just save that and enable the test Suite test test test/ test Suite execution let's go back to our test Suite now for Knowledge Management I think it was still set to inactive and it's read only well let me change this property even though it's read only this test Suite cannot be run because it is inactive um it's read only based on its policy protection so I got to copy this it looks like so there's step number one copy the test week got I hope it copies the test the tests and the the steps in the test okay this can consist of one or more readon tests demo data is required for the copi test to pass refer to the notes field on each step t for hints on updating the test to pass with your data if you have customized the business process ass so to I haven't done that revise the test to match the customizations okay all that makes sense thanks for the warning service now now it is copying the test suite and uh it's copying individual tests okay all that finished so it looks like my next step is to go to the copy of this sweet so let's go to the copy aha got my active button that's good 271 knowledge records match the conditions um I haven't set any conditions on this so uh I just want to run this test Suite so everything looks like it copied over let's just open that first one just like we did before yeah it's got all the steps and the execution order man this is pretty cool I can't believe I haven't done this before all right so I'm going to oh I can just run a test oh did you see that all right let's do that first let's run a test has nine steps all right since I'll start at the very beginning and then we'll go up to the suite if this uh looks good so I'm going to run test the test you have selected includes client side steps choose a browser to run what does that say to run this test manager test Runners here start a new test Runner Cloud Runner to run test with the cloud Runner install the ATF test generator and cloudrunner store application I don't think I've done that run test we do it anyways so it's running in my browser this is interesting I'm actually going to see it oh cool waiting for test to run create an edit an article know record not found well that test failed taking screenshot wow I get screenshots interesting so notice here while we're waiting performing other activities while testing are running are being executed can result in those activities being performed by the currently executing user and could be rolled back ah so it's recording what's happening and it's going to undo everything that gets done so if you go do something else as the same user what you do might get undone as well that's interesting okay so I was just sitting there and nothing was happening it was on this screen uh I clicked on this menu that didn't help me at all I clicked on this it didn't take me anywhere so I went back to this tab and I can see um stuff failed succeeded and canceled so um 1 two 3 four five so I'm just going to go to the results kind of disappointing that it left me sitting there waiting um but that's okay my time's no big deal did attach some screenshots and I can see the successes this gep did not execute because of a failure in a previous step record query deprecated no matching records okay so that was step number five all right let's go back to um you know me I got to fix things let's go back to step number five all right there's the tough steps and validate that there's at least one record in KB feedback matching the query all right so this is what's broken validate there is at least one record in the kbor feedback table matching article is an assist ID okay so let's just [Music] grab so I don't know what's in that table kbor feedback so let's go check that see if there is um yeah so I got a couple oh all the articles are empty well duh okay let's go ahead and set the article on one of these to Microsoft Outlook issues check that one now I'll go back to my test right here and step number five which was failing we'll just change that condition filter to look for that um Microsoft Outlook issues which now that should be true so we'll update that and now I want to run my test again because this is fun so run test it sees Chrome that's good so this okay so I guess what's Happening Here is I could run my test in the cloud you can't see it I I'm now seeing it I couldn't see it before there's a little radio button right there where I could be running this in the cloud if I had it I don't think I could do that on my PDI probably not um because you can't get store apps in your PDI but we'll check here after this so we're going to run in Chrome version 117 didn't know I was on that version but run test and is it o it's using the same window as before interesting oh no knowledge record not found darn it failed 100% good result did I not update that right so it's interesting this little test Runner window just stays open so this tab is just open okay all right so it failed again on step number six all right step number five passed okay let's go take a look at step number six I'd like to get one of these to pass uh just for fun it's turning out to be more work than I thought thought uh okay this one validate that there is run at least one record in KB feedback task matching the query um query is feedback is from step five okay so it's using a previous steps result so what so I need to create a feedback task on that thing that I have Okay so let's go back to history let's go back to knowledge feedback let's open this knowledge feedback right here and how do I create a task anybody know someone telling me okay so knowledge Administration properties I can create an actionable feedback task when an article is marked as not helpful okay that I can do real quick so Knowledge Management do I have a Knowledge Management Properties Let me refresh my menu real quick oh there we go I was missing my knowledge menu all right properties all right good grief create when an article is flagged according to the port portal and workspace only or when it's marked is not helpful so I just got to flag it okay um in a workspace so let's go to service offs workspace hopefully I get the nice same knowledge article that I picked for that before think was Outlook issues all articles and Microsoft Outlook issues so I want to flag it into workspace where can I flag flag article there we go testing ATF quick start flag article all right article has been flagged oh I hope I saved that properly uh I don't think I did now that I mention it um knowledge feedback management properties's scroll the bottom B oh no it was already activated there when it flagged so I should have a feedback task now FB feedback task. list not FB kbor feedback t. list I do I do I do I do okay now we get to do our test again so let's go back to our history man this is being a longer video than I thought all right here goes our test and there goes all the stuff so we should get past test number step step sorry I can't talk step number six and um yeah let's do it run test going do Chrome and that's going to start in this window here we get to watch it again it failed again good grief I'm getting irritated oh I need to update that step you know I'm just thinking here out loud like having specific data within a test step isn't really a test because you're just testing that specific data point I want to test all possibilities of a data point so I'll just leave that out there leave a comment down below if you disagree with me um or you think I don't know what I'm talking about I'm happy if you tell me that that's fine I'm just getting to know this thing so open existing record step number six is that what failed before hold on 1224 was the latest one it failed on step number six no records matching query feedback equals okay so go back test steps number six also that deprecated thing is concerning me step config deprecated use the new record query step okay so someone on the quick start has deprecated content in there which is interesting all right so validate there is at least one record in kbor feedback task matching query feedback is from step five the first record that was returned delete that one okay so I think that this one doesn't have a feedback task cuz that's the original one I did but look at the dates here so this is the one that was originally there from February 2019 here's the one I just did for October 16th uh testing the ATF quick start so I'm going to get rid of the old one because it's only returning the first record and that way now it'll find this one which should be linked correctly so okay if I'm right let's go back to our test we will run test run test watch it over here and actually i' just rather watch it here because that is uh a bunch any changes yeah that's fine yeah that doesn't do me any good here but knowing the percent complete so while while we're waiting actually that might be done might be it let's go yes we're 100% succeeded okay good so I finally have used a quick start test and I made enough changes to it in order for it to complete successfully I think my opinion now of this is what I would have liked to have seen is before it started querying stuff that it creates a knowledge article publishes the knowledge article oh you know what maybe it does let's see what step with this was in the let's go to the actual uh test results we got to go way back way back test step test suite for Knowledge Management uh I just did this first one which was step which is the first one actually it's got It's oh you know what create and edit an article from feedback task feedback task form copy okay well here or there about the order of things this looks like out of order and whatever so okay so this isn't as quick start as it seems but what I would have liked to have seen for that particular step that I tested is that it created the article published it then goes and flags it and then he got creates a feedback task if that setting was set it was and then run to the rest of this but that's a lot of stuff in order to run and um a lot of stuff to prepare so overall I think it's pretty cool now I want to play around with testing my stuff like maybe after an upgrade making sure my stuff is working and so there's a there's a feature to autogenerate them but I bet I'm going to need some plugin but anyways that was Vancouver version of Knowledge Management quick start test for automated testing framework or ATF I hope you found this video helpful if you did please like Please Subscribe or share with somebody who you think might be interested in automatically testing their service now instance and until next time don't forget to always be learning [Music] n

View original source

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