Transcript for:
11-Manual Testing Techniques for Mobile Applications

[Applause] today we're going to be working on uh writing test cases and Bug reports for mobile testing okay that's actually going to be the second half of things so specifically how do you write test cases how do you write bug reports uh focused on mobile the principles of course would still apply if you were doing web testing right they're they're basically identical um in the first half we're going to focus a lot on code now for those of you in class and I think we're a little light on students here this evening um does anybody currently have a Macbook regardless it's going to be mostly just following along uh but I will tell you what we're going over today in xcode you can't run xcode on a Windows device um so you know like I said you absolutely do not need one for the course please do not feel compelled to go out and buy one uh your your office or your company will send one to you like I like I said it's for the vast majority of people in this industry we are working on MacBooks I assume that they will send you one but again please do not feel like you have to go buy one um in the first half here I'm going to show you some stuff that you can do with xcode uh we really only scratch the surface as far as what the capabilities of xcode are because we are not developers uh it in and of itself is what's called an IDE integrated development environment so people write very complex uh you know heavy apps within xcode uh that's that's not us right so I'm going to show you some stuff um and then in the second half it'll be much more Hands-On everybody will be able to participate uh because that involves using Google Docs and I know everybody can have access to Google Docs um so like I said you know we'll be doing manual testing of mobile apps and then I'll be showing you how to use a simulator in xcode um now I'll have my own personal caveat once we get there but um the easiest question that we can probably answer tonight is what is IOS app testing right so this is the process of checking and validating the functionality usability and performance of an application specifically designed to run on one of these guys right any one of the uh the Apple devices with the IOS operating system so U of course the first thing that we check is functionality like do things things work uh we will then of course in the process of that also be checking user interface uh you know specific features for the application navigating around the interface you know trying to pop around in there and then compatibility across different versions uh you know not only of the phone itself but then the OS that sits inside of it so you know not just iOS 17 uh but also iOS like you know 16 maybe you back paid to 15 uh my my personal test device is an 11 Pro Max but you probably want to get something that's a little bit more um you know you don't have to have like the 15 Pro Max but some people are going to have that so it's good to have a spread right couple different devices amongst the team um my my team has uh let's see uh there's at least five of us that have different devices and we all have different iPhones so that gives us a pretty widespread now um that kind of gets into the next slide here so how uh iOS apps are tested testing can be conducted on real iOS devices or simulators provided by Apple's development tools this is just me saying this right now I don't use simulators when I test I'm very confident you won't use simulators when you test Okay the reason that we should see this is one you should know about it you should just know that it exists if somebody asks you you know like uh you know how could you do testing you would want to be able to say like yes we we default to real devices as often as possible however uh you know there are situations where we could use simulators the people that use simulators the most really are going to be developers because uh we talked about in the last lesson they have code that they will have to compile into an APK into a a build version and then they're going to have to make sure that things look good uh this is sometimes called their sandbox environment for sort of obvious reasons they're sort of they're playing in the sand they want to make sure that things work right before they hand it off to you so they may work on simulators um automation Engineers will also work on simulators because it might not be cost effective for them to hook up to a physical device and have their testing running uh you know for hours at a time overnight so having a simulator for automation might make more sense for them as well I have to imagine right uh for you as a manual QA you're going to be defaulting to real devices as often as possible but I do want to show you what it looks like you know to to get a simulator loaded um and you know just just some quick things that you could do with it so you know naturally and this is sort of affirming what I'm saying testing on real devices offers the advantage of assessing the app's performance in real world conditions right you always want to you always want to actually get the thing into the real world and and try it out there's going to be device specific behavor haviors network connectivity issues um you know even just today I'll I'll tell you as a very real example I was kind of stressed today because we are releasing a major new feature in our company uh at the end of next month and we're testing across all platforms and just today Android just decided it was going to start running like it was going through molasses right it was just super slow um it's something that I don't want to see but that wasn't happening when we were on other platforms it wasn't happening in a different environment it was just this platform this device right or or like you know the the Android platform multiple people validated what I discovered so that's why we want to get into that real world environment as often as possible for testing um now on the other side of the coin it could be expensive for a company to have many physical devices floating around and and you know getting them shipped and set up and stuff like that so simulators can be more cost effective to test across different iOS versions and device types so the goal of testing our iOS apps is to ensure that the app functions as per the requirements and meets quality standards now we can say the exact same thing about testing Android apps right it just we happened to be focused on iOS uh for this evening at least when we're going over xcode so some common bugs that you might run into are you app crashes these are the worst you know these are the uh like the Fatal or critical crashes so it can unexpectedly quit when you're in the middle of using it so that could be coding errors uh resource constraints resource constraints can simply be something like uh you know the app has failed to release oh these are out of order you come from here to over here right you know if an app is not releasing resources like if it's not letting go of memory it no longer needs that can just Rob all that from your system and eventually the app will crash because it has not no new memory to be pulling from um not hyper common but it's a real pain when it does happen the uh you know apps that work well on one version of iOS might not work on another version Apple may have introduced something different that our developers didn't account for or our developers simply just didn't change something that was required as part of an update so um you know if it's not compatible with the new version of an OS there can also be flaws in an operating system that may allow hackers to break into a device and then get access to private information obviously this is you know a situation that we want to stay away from as often as possible so if security defects or security uh risks are discovered by the team you can be sure that they're going to work pretty hard to get those fixed as soon as possible we want to keep user data safe uh we all hear about in the news right whenever companies have a data breach or a security breach it's a big deal you know you have people's sure you know names phone numbers email uh but also physical mailing addresses Social Security numbers license numbers um you know potential um you know device usage history and that can be very compromising for people um you know people can sell other people's information out there on the black market so security is a very big deal that's why you know uh people in tech security are are getting paid very very well so these are just some of the common things that you can look at you know crashes uh lack of memory dumps security flaws and then just other other usages when you're using it like uh maybe navigating from one page to another this is what I saw today navigating to a specific page within the app it just takes a god- awful amount of time and you're like something's not right with the way that we're linking to this page so that could be something you encounter uh as well so uh that's going to dive us into the meat of round one here what is xcode right so xcode is as I said it's an IDE it's an integrated development environment people build apps with this thing uh but it also comes with a built-in tool called the simulator which is an essential component for mobile testing uh and again we are going to default to real devices you know 99.99% of the time uh but you should know that developers and automation Engineers might be using a a simulator so uh the simulator will allow people to run and test their applications on a variety of devic Dev without needing them in hand right in front of them so critically xcode is not available on Windows in this course you're going to be going over to you know uh xcode and then Android debug Bridge so ADB which is a command line tool ADB can be used on both platforms you can do Windows and Mac for Android debug Bridge xcode only lives uh in the iOS environment or or the the Mac OS environment unfortunately so the link to download that right this is is going to be in the slideshow for when you guys are actually reviewing this after the fact and again you know sounds like people are not actually using MacBooks right now uh but this would be the link you can just kind of save this for your own reference this would be the link and basically what you would do in here this is just going to be linking you to the latest version of xcode uh you know it's a Mac site so it's clean it looks nice you only need to be really up here right so you would just hit download you grab the latest version it probably wouldn't go for the beta it's going to be a little less stable so just grab xcode 15 um when you do that you're basically just going to uh download that xip file and then once you have that um you know it's like sort of a zipped folder but you'll have the xip file on your computer you're going to d double click on it that will extract it and then the way that you install things on a Mac um there's going to be a window that pops up and it has your app and a folder and you just drag the app to the folder and it kind of goes like boom and it installs um I was not about to go through the process of uninstalling xcode just to show you how to install xcode because it can be a pretty lengthy process TimeWise but the information on how to do this will be in the uh in the slide presentation this is this is basically what I was just talking you through right now like how do you how do you download it install it onto your MacBook but you just go to that website click that link download the file unpack it um or you know extract it rather and then drag that onto your install folder pretty much it uh but the benefits of xcode right we kind of covered most of this but it will give you variety when it comes to devices it will allow you to have variety of operating systems as well so we can emulate or simulate um you know iOS 17 16 15 backwards compatibility stuff and then the QA can interact with their application as if it was running on an actual Dev to check the um well it' be the UI elements ux elements is not really a thing ux stands for user experience by the way UI stands for user interface so you always hear these things together right people talk about uh ux UI designers or U uiux Engineers or something like that people may do both but they are distinct right UI is user interface ux is user experience so I would say like you know this is more like the things that you interact with the the the pretty buttons and and the Scrolls ux kind of deals more with like the psychology of of how do we use this application you know why are we interacting with it in in such a way there you go so you can see down here in my tray these are the two big things that you're probably going to see for um you know installing build files and then testing out like what we're doing here so xcode once you install it it's going to look like this um you can see that if I rightclick on it right now not a lot of of options that are going on and I just want you to see this for for reference later um so you know once once it's not opened not a lot going on but let's click that uh oh you're Speedy today so that opens up right here now once this is open and I right click you can see that I now have developer tools open right here and specifically within the developer tools my second menu option down is the simulator so if I click this there you go there he is so that's just going to fire up a a simulated uh 15 Pro Max right so this is you know the they want you to check out the shiniest new version of whatever they have there now you have the option to open up uh different simulated devices as well the first time if you were to open up xcode and for the first time launch a a simulator it might ask you which device you want to go with I think once you've done that it's going to try to default to like the latest thing but down here in my tray you can see that if I I come over this new menu option that showed up simulator and if I rightclick on this you can see that it's showing me this device by default with this operating system if I come down to the next one you can see that I have the option to fire up different devices um so what do I have I have one two three four five different iPhones uh one two three four five different iPads right um what this will not do is simulate a Macbook right because that would be kind of silly to simulate a Macbook on a MacBook um if you wanted to if you wanted to test an earlier version of Mac OS I would point you towards something like browser stack where you're actually going to go use another real device and they all have you know earlier versions like um like Mojave or something like that so but yeah in here you could choose you know to to open up a different simulated device and I mean basically you know once it's there you're going to have this in its own window and then you're just going to kind of start messing around with your app you'll you'll talk about this in a future lesson of like loading apps in here but I mean basically I could come in here and use it like a phone so I'm going to open up my like my uh my photo album be like yep sure is a photo and I can use my mouse you really want to use it like a like a phone so you're not going to really like click through stuff you're going to like tap and drag like you would with a regular phone um you will find once this is open you're going to see a whole bunch of control options up here um so up up here in your in your tray you're going to see that they'll tell you how to do a bunch of different things like rotate the phone left and right um you know portrait our landscape uh where's your volume yeah in the io stuff you can do audio input changes increase or decrease the volume coming out of it while you're using an app so use it like a phone it's just there's there's some other keyboard commands that you could be using to control it so if I hit like Command right you can see it rotates the phone as if I was holding it horizontally and we would want to check you know what is the experience in this app when I do that I'm hoping that the photo will rotate right if I come back to regular orientation it should be showing this to me in um in portrait mode and then I rotate it did it rotate to landscape yes it did uh when the phone's upside down doesn't do anything when I go to the other side it flipped it around and then back to our main setup right so you just you could kind of mess around with that you could also certainly be going around you know tap on the edit and then when I tap on edit you know do I have the ability to to modify things in here now this I mean you can see right now I I think this is a bug right when I tapped edit it's just showing me a black screen so this would be if I was I was actually trying to test this out application out I would probably report this as a bug like this is a problem this is not how I want this to behave right so um you know that's that's not a great experience you can see yeah I mean this is this is not doing what I want it to do so if I made some edits yeah know I really can't do anything with that so let's just go back home but you know again that's that's what we would be doing with the simulator you know popping through opening up our apps seeing if it behaves the way that we expect it to so on and so forth um let's see if I click watch yeah you know make sure it's going to be doing what I want it to do I would need to yes pair an Apple Watch to this to actually start testing the functionality but you can see it's going to work like a real phone it's going to allow me to connect to peripherals and stream content uh you know and do all that stuff another important thing that we would want to be able to do um I mean just just check the responsiveness right check the the functionality of things check uh the UI of all of these you know what happens if I if I um you know where were to hold on something like that oh I don't actually want you to do that but if I'm clicking around in here does something start sizing incorrectly or does it look like it's trying to load it as a as a desktop app as opposed to Something in in Mobile right something that doesn't look so great uh this seems to be performing the way that I want it to but yeah so that's you know basically what you'd be doing with your simulator now the other thing you could be doing here is testing your your mobile web apps so you guys remember from last time we talked about Testing mobile apps or or sorry um mobile web apps versus native and hybrid apps right for our native and hybrid we need to sideload them we need to load them onto the device for our uh mobile web apps we we can just go into to the browser and we can test this out just like we would right so um or just like we would on your actual phone one of the things I showed you last time was the ability to connect to Dev tools and that's something that you would want to be able to do here as well um so to do that well actually let me let me back up first thing you'd have to do is is actually set yourself up to do that so you would want to actually open Safari browser right and so when you have you just kind of forget about the simulator for a second when you have the browser open here you're going to want to go to your preferences and the way that you do that is command comma oh and again that's on my other screen um going to command comma it's I mean it's it's the same as coming up to uh tapping on Safari and then settings it's going to be the same thing but your keyboard shortcut will get you there faster um so command comma this is where you would have all of the the controls for your Safari browser but we would want to go to Advanced and you'd want to click off this final box down here okay that says show features for web developers um I think let me go check actually important to note right because you guys are going to read through this slideshow after the fact you can see here uh this is actually outdated they probably were using an older version of safari when they did this it used to say show develop menu in the menu bar now it's going to say show features for web developers so just so you know like as you get into an updated version once you get into um this is well I guess anything X U xcode 15 any version of xcode5 you're just going to see that change a little bit so just be aware that that exists but you're going to need that on in order to be able to um use the inspector or use the dev tools for this so I've come over here sure why not we're on the Formula 1 website right so load up whatever you content you want does anybody else watch Formula 1 maybe it's just me I'm I'm a big fan um even though my guy is struggling this year so but let's say you were tasked with testing this site or you know it could be it could be anything right we could go to you know my my company's website cool so we were here and then if I actually wanted to log in uh let's say uh don't save that for now uh cool there you go so this is me logging in like this is this is what I do on a daily basis I'll be going in and checking our product and checking out everything that's on our website right here um so now that this is opened you're also I I believe you're probably going to need this open too just to access the menu but from here if I want to be using mobile web and checking out the dev tools from here I can come up into or sorry tap on the Safari window then come up to develop and you can see in the develop menu and then you can see if I hover over my simulated device right it has my actual device and then the simulated device simulator right there you can see that it tells me right and it's even highlighting it like in your simulator you have Safari open you have this website open now if I click on that now I have Dev tools open for my simulated device and you'll be able to see this working right if I come in here you'll see this little Trash Can icon let's clear that uh there's nothing in the console um but if I'm on the website and I drag down to refresh you can see you know all all of this information is loading up and the same thing in the network tab I should actually come over here and show you that um it's still loading so as I try to do that all right drag and refresh come on drag and refresh please there you go now you can see as it loads the site there's a whole gang of stuff that's happening on the back end and so it is my job to go through and if we're testing this on mobile web I'm going to be able to look at certain events in here and make sure uh you know yep that loaded correctly What's um uh anything in specific so like you know one of the services that we use right like is is that loading correctly great headers are loading the way that I want them to so um that would be one of the other big things that I would want to show you as far as using a simulator and doing your testing uh again I acknowledge that most of you do not have a Macbook on hand so you're not going to be practicing this now tonight in front of yourselves um that is okay I just want you to be aware that this exists I want to be able to walk you through that process at at least one time just so you can see how this works um and then you'll be able to have this as a reference you can kind of go back and at least just see the material um know that this exists for an interview or when you get to your first job if if for some reason they do want you to use a simulated setup you will know okay this exists right um let's um yeah let's open up another one let's do let go back we were having fun there right Formula One so now if I come over here I have you know I have two sites open so if I come back to that develop menu you can see how it's got every website that I have open so I wouldn't want to click this one see it's not highlighting it because it's a different page that I have open I would want to click that second one in order to get into the inspector for this one just close those out boop boop boop cool that's honestly everything that I wanted to go over for for the first half of class so for the second half um we're going to be going over writing test cases and and I guess bug reports as well now you're going to help me out the structure of our program has changed and you guys are in sort of a newer a newer format for it keep me honest have you already seen writing test cases and writing bug reports we are going to select a specific functionality on an app that you want to test and and honestly like you can choose the app it can be whatever app that you want to be doing testing on okay so you are going to be developing your own test cases for the functionality that you want to test in that app okay so so check one specific thing that you would want to be able to check in that app like one functionality um I'm going to ask you to make a test case for that do manual testing and then subsequently document it uh on this spreadsheet right here okay so this one right here let's give you come on there you go everybody go ahead and grab this link that's in the chat and importantly you can't edit this one okay you should not be using this one to actually write in uh what I want you to do is I want you to tap file or click file rather and make a copy okay so I want to all more right over here file make a copy and you can call this I know it says lesson six again structure change so we're doing this a little differently um so let's call this uh lesson 11 cool there you go let's make that copy and once you do that now you're going to have your own version that you're going to be able to actually write in okay I'm going to want you to go over to the share settings and we're going to change that to anyone with the link and then click this here as well can edit what we're going to be doing is selecting a specific functionality on an app that you want to test it can be simple or it can be more complicated that's totally up to you um and we're going to have you developing your own test cases for this functionality so you're going to do some manual testing and then subsequently document it in the sheet um we tell you to do this because I don't want you to just think in your head like well I think I know how to do it like no no I want you to be very clear on how exactly to perform this test okay so you will document that in your new sheet the version that you have just created um and then you're going to share your results by sending the link into the chat for feedback and then I will uh I'll pop these open and just make sure that we're all feeling good we're all you know more or less on the same page about writing our test cases and Bug reports and if you do find a bug you can create a bug report you know within that same within that same sheet within that same folder let's do I mean I'm just going to do a pretty simple one so that we can see the structure of it so photos that's going to be you know I'm just going to go on to my phone and I'm going to do something very simple um so test platform is going to be iOS right now within our test cases we don't need to dictate which operating system that we're doing this on um or even which kind of device that we're doing it on when we write a test case this is recyclable right this is something that's going to be reused over and over again into the future and so we don't want to say like you know iOS 11 Pro Max running iOS 17 right it's simply the test case of in photos on iOS you know doing whatever it is that we're going to do as you go and execute this in the future someone will say okay we're going to run through these 20 test cases um and the latest release candidate or the latest RC for iOS is going to be app version you know 13.2 so you're going to load that specific version you're going to run that test case and then when you're doing your validations you're going to pass or fail it on that platform that you're using for the test okay uh so just so we're clear about that and then so for something simple I will say um verify that uh user can edit a photo in photos okay when you write your test cases and just to recap we do want to use this kind of specific syntax right you want to start your test case title with verify that and then whatever specific thing that it is you're trying to to validate or verify right so what you'd want to do is you write it like that because basically when you get to the end of this kind of spoil it for you you should basically be able to copy this slap it into the end here and then take off the verify that portion of it right that is my expected result user can edit a photo in photos this this is going to guide you uh because if you have a test case title that says verify that you can edit a photo in photos you go through your steps and then your expected result is uh you know user can upload a photo to Instagram you know or something you crazy off track like that you know that you went somewhere wrong right like somewhere along the line you lost track of what it is that you're actually trying to test so um for the sake of keeping us all sane and looking at the same thing together we're going to want to make sure that we're structuring it like that so let's uh not what I wanted to do that's fine all right so test case title verify that and then whatever it is you want to do precondition right this is something that needs to happen or needs to be true before you can run this test case if you if you have a precondition and it's not met then we know that you can't perform this test case Okay so who can tell me what a good precondition would be for this test case that I'm doing okay uh Tyler what you're saying is not technically wrong like you you do need to have a a photo gallery um login is sort of less important right we don't we don't need to log into the photos app on our iPhone right it's just there um me or Myan opening the app while technically that is going to happen that's more like one of our steps it's not a precondition right like technically we do want to document that but that's basically going to be like step one for our steps uh Casey has what I'm looking for right um Casey saying you have to have a photo in your library that you can use and so I would consider this to be probably the precondition that I would be documenting someone may think of another valid one um there are things and I I don't want to confuse you there are things that we can consider as sort of given we can consider that these are obvious like you don't need to say that uh user has to have the app downloaded we we infer that right um we also don't need to say something like you know your your iPhone needs to be on or something like um or like you know having a photo gallery right but but um Hala and Casey really have what I'm looking for so I would be documenting that like this uh user must have at least one photo in photos right precondition is such that not every test case has a pre precondition that you would need to document but if you have one you need to meet that precondition before you can run the test case okay if you don't meet this precondition you cannot execute the test and that's really that's something that I want to make sure that we're all on the same page with um and I know that it can sound a little confusing when I say some things are given some things we consider to be you know redundant or obvious um because that can get people in trouble I want you to not overthink it but just think logically from a validation standpoint how would I edit a photo if I don't have a photo and it's kind of the mentality that we want um it's not always going to be structured just like this if you have a new feature that's coming out for your for your company right so in the in the iOS version of their app there's going to be some new functionality and we're testing that in a lower environment you may have something called a feature flag what that is is people you know from the development side they introduce a flag or a toggle that we can switch on or off um you know using Code or some sort of interface and we will call that a feature flag and we may have a precondition that says like you know um you know uh what are we going to call that you know something like that like this feature flag must be on right U because if that flag is off then this new thing that they're trying to test might not even show up in the testing environment so you know that might be another precondition we could say um if we're testing a like a lot of apps have some sort of an instructional flow like when you interact with something in that app for the first time it'll say like hey you know congratulations you've done this um you know you can you can do more of that thing on another page right and so in that situation if we're trying to say like you know a firsttime user uh you know likes a photo and then our test case title might be like um verify that firsttime user um liking a photo receives instructional popup the precondition for that would be like um you know user cannot have interacted with anything on the app before or like tester must use a fresh account for testing something to that effect right I'm hoping that makes sense um for my very simple test case case that I'm just showing you right here I'm looking to edit a photo in photos and then a user has to have at least one photo in photos for me to document this I'm going to say step number one tap the photos uh app icon on the home screen or on the main screen I guess because it's not on your home screen so that was to um is it is it mayen or is it Meen forgive me I I keep saying that you know I'm hoping I'm not screwing it up too bad um but that's step number one I want to tap it and and we will say tap not click right because that's that's what we do on phones right so I'm going to tap just like that that brings me to my albums I may simplify things by saying something like um open an album or even let's say this tap to open an album and tap on a photo I think that's very fair to be able to say so I do that and then you know that brings me to a that brings me to a photo right step number three I'm going to say tap edit in the top right corner it's good practice for you to give a what and a where when you're giving instructional steps don't just say uh you know click edit or um you know apply a filter or something like that that's too that's too vague and that's too broad we want to be very specific so you can see in the top right corner says edit maybe you can't see that I'm not sure but you know that says that so then from there when I tap edit we're going to say um tap and edit uh let's say editing feature and apply and edit to the photo now that may sound a little vague what we're not trying to do is validate any specific editing feature like so it doesn't need to be exposure or highlights or Shadows or contrast or brightness I'm just toggling through all of mine right now right um we don't need to go through every single one of those it's simply we're testing can you edit a photo and to that point we can leave this open and just say like all right it can be it can be anything so I'm going to go in there and apply you know some silly filter to this photo right so it becomes very obvious to me that I've applied the filter my fifth step is going to be tap done button in the upper right corner because again as soon as I've applied a filter I get the option to say done right up in there once I tap done it now shows me that edited photo in my Carousel like it just says like here's here's the thing that you just applied an edit to right so at that point five steps later I can get to my expected result which is user can edit a photo in photos right so make that look a little nicer this is the kind of specificity language documentation that we'd be looking for when you're writing a test case um at the end of the slideshow for tonight's class there is a again another glossery just kind of like checking out some some vocab making sure that you feel good with what we talked about um and then yeah just you know sharing your feedback on the lesson so there that's going to be about it we are here at the weekend and we're right on time so I'm not going to run my mouth anymore uh congratulations very well done I'm not sure what the next lesson is that I might see you um so I can't predict that for you but I do hope I run into you guys again uh have a great rest of the night and enjoy your weekend take care everybody