In this course, we're going to talk about how to test applications for the web and mobile devices such as Android or iPhones. If you're watching this chances are you're watching it in a browser. So, in the last ten years, the web has become the dominant way that people develop applications. It's just exploded and you can't escape it. If you're using Google Maps to find your way around, if you are watching movies on YouTube, if you're shopping on Amazon, you are using a browser to mediate content that's coming from servers that may be thousands of miles away into your browser so that you can do what you want to do. There are several good reasons for this. First the languages that we use to construct the user interfaces that we use for viewing web content HTML and XML, are well documented, well-thought-out, and pretty functional. The second thing is that the web protocols, the underlying networking support, that's used to construct these web applications is really well-thought-out, and allows web applications to scale to almost unimaginable volume of transactions in terms of previous applications. In order to do that, they use in architectural style called rest, and we're going to study a little bit about that, just so that we understand how to test the applications that are being built on these principles. And finally, the last five years has seen an explosion of use of something called JavaScript. So, JavaScript has nothing to do with Java, it's another programming language that shares a common prefix. But JavaScript is used to send programs from an application server out to a client, so that the client has a richer experience. So, when you're using Google Maps for example and you zoom in on something, it almost happens immediately, and the reason is because there's some code that's actually running in your browser that allows the application to respond quickly without sending a request to the server. So, we'll study a little bit about JavaScript so that we know how to test these rich client applications. The other major change in computing over the last 15 years, is the use of mobile devices, and we used to have a large number of different cell phone platforms from a variety of different manufacturers, but it's really turned into two now. So, we have Android phones made by a variety of hardware manufacturers but the software is made by Google and iOS which is from Apple. These have entirely different ecosystems. So, when you're developing Android, you actually use Java to build your applications, and the programming environments that are used to build Android applications are very familiar to the ones that we use in this course. When you're developing iOS applications for Apple devices, you're using the languages Swift and Objective-C, and these are sort of outside of scope for the things we're going to cover in this course. But if you know how to test Android applications, the same concepts will apply in iPhones. The interesting thing is that phones admit an entirely different interaction style than you have in a desktop. So, the gestures that are exposed in the phone things like, zooming, scrolling, and swiping, allow a rich experience even with a relatively small form factor. But testing those applications can be tricky, because you have to try and duplicate those user gestures programmatically. This is a big area. There are lots of pieces and parts that all have to work together in order to construct a good user experience across this distributed application that we're building. So, on the user side we have a browser, and if we simplify the problem dramatically on the server side, we just have a web server that's giving content to the user. But oftentimes this is mediated through the app store. So, you actually have an application that's running on your mobile device that uses a browser but has other functionality. The other thing that happens is that when we are building these distributed applications, we don't want to go out to the web server all the time. So, usually we cache data locally, so we don't have to go fetch it. Then we also have gateways that sit between the browser and the web server. So, these might be things like load balancers that allow us to split requests across multiple computers, or it might be firewalls that block certain requests coming into the web server to make for a safer browsing experience. Then the web server itself has plug-ins that allow the web server to serve different kinds of content, and those plug-ins may talk to different services, that actually build the application-level functionality. Behind the services might be databases. So, there are a ton of different components that all work together in order to build these distributed applications, and we won't be able to test all of them, or think about all of them in too much detail. But it's important for you to know how these different pieces and parts fit together so when tests fail, you have some idea of who to go talk to. So, the primary means we're going to use in this class, is me testing within the browser. So, the things that we're going to do as tests, are the same things that you would do as a user. So, it's going to be things like finding data within a page. Making sure that that data is correct and it's in the correct location, and we need to be able to simulate user input. So, things like pressing buttons, or adding text into text boxes, or clicking check boxes, or making selections from list boxes. So, the kinds of things that the user would do to interact with the system, and we want to do this robustly. So, if we're running on different browsers, or on different operating systems, it could be the case that the user interface elements have shifted around to some degree. So, we don't want to use a pixel location to determine where to press a button. We want to know a little bit more abstractly, that we have a button that has a certain unique ID, so that we can press it. That way these differences between browsers and operating systems sort of go away and we can do testing robustly. In order to do this robustly, we're going to use a framework. So, there are several different web testing frameworks that automate the UI interaction between the program code that's running the test and the browser. The nice thing about this, is they provide a common interface between all the major browsers, so things like Chrome, IE, Edge, Firefox, and Safari, and the nice thing about that, is that they allow us to ignore the visual presentation to focus on content. Now, this is both a good and a bad thing. The good news is that we can test uniformly across these different browsers. The bad thing is that certain kinds of user interface problems, where maybe a table isn't showing up in the right place or something like that, will be difficult to test using these frameworks. So, the one that we're gonna use is called Selenium, and it's used all over the place. It's pretty universal, and having Selenium skills is going to get you into testing jobs when you're looking at web-style applications. But some other good frameworks are Squish, Tricentis and Cypress. For Android platforms. we're going to use a similar tool called Robotium, and that allows the same kind of automation that you'd get with Selenium, but focused on Android applications. So, just to recap what we'll cover. We're going to cover client-side UI testing, so the browser and Android OS but not iOS because it uses a different ecosystem. We're going to look at functional testing with user stories. So, we're going to bring back Cucumber that we used in class two, to look at automating web tests, and we're also going to look at performance and robustness testing. So, how do we make sure that our web application is secure? Now, we can't do this at large scale but we're going to be able to do it at least on a single browser for small applications. What we will not cover is usability testing. So, it turns out that in order to do usability testing well, you have to know about usability, and this is, of course, in and of itself. So, there are other courses in Coursera that can cover this in a way that we can't. Another thing we're not going to cover is JavaScript testing. So, there are a bunch of big JavaScript frameworks that allow you to build rich content both on the client, but also on the server. So, things like Node.js, Angular, and React. What we will do is interact with those JavaScript applications or applets, when they're on the client using the standard client-user interface mechanisms. But we're not going to focus specifically on JavaScript testing. Finally, we're not going to cover any kind of server-side testing, so testing outside the browser.