Subtitles section Play video Print subtitles so thanks for having me. It's great being here. Thanks to Robert on Daniel for giving me the opportunity. Speak. What are going to discuss today is just the general overview to test thing I'm gonna talk about What is testing. Why do you need testing? It's not gonna be too technical. Right? So if you already have some experience, I hope it's not too boring. Okay, um, I was planning on doing, like, a quick life demo at the end. Where can actually show off how you contest some small web application, which, unfortunately, since technical issues, we can't do today, But just walking through the code on get up real quick, See to make the best out of it, I guess. Right quick. Bit about myself. Where am I? Well, when in towns like it's already I'm not a front. Okay, most of you here forced eco front and Jeffs. I am not actually have a job and see shop background and just recently got started with Ruby. So if you see any coat that looks like garbage, um is not my natural habitat. Okay. I am tutoring at the technical university, some helping out of teaching. There coincidentally, in the subject's testing and software quality assurance. So you see how this office works? Yeah, and I myself am a big fan of testing. Why do I like testing? My first job was in a testing firm. Um, and yeah, I like testing because it, like, protects us from the court from the evil that is called. Okay. What did he mean by that? Um, no problem. It's kind of hard. A lot of people have written about how software today's kind of sucks. I remember an article I read that was tightened. The coming software Apocalypse was really like, Oh, my God, We're gonna die. Um, the problem is substance really complex today and that causes a lot of issues. Came um What I mean by software's very complex quick guessing game. For your what? Directing an average car. Like not average but luxury car today. Like smart car. How many lines of code does the software in the car? Just software stirs the car. Unearthing how many lines of code are in the direction. It's gonna be one million is gonna be 10 million. 100 million. Give me a show of hands. So I know you're not asleep. Who thinks it's one million? Okay, One. All right. He thinks it's 10 million. 10 million lines of code in the car. Bunch of people who thinks it's 100 million. Just one. Okay, Was trick questions, actually, 600 million lines of code. Okay, 1,006,000 lights code for frickin car. That's what we've come to a complex code means a lot off. All right, Um, it was like to touch some piece of software. Basically breaks as soon as you like poking it An example. Always give for critical software. Eros is the story off the Arianna. Anyone has a clue for Arianna What the Arianna is exactly. Yeah, was a rocket that was built in 1996 by European Space Agency on the story about Arianna is Arata said one to build this thing. They developed it for 10 years, cost about 400 million bucks when I launched it and it went up like four kilometres. And then it blew up because someone didn't convert some floating sze into its properly and the rocketed like a flipping and went bang. Okay, fine of 1,000,000 lines of code because of a teeny weeny era. There was almost no more than 20 years ago. Ah, more recent story. Maybe you followed uber self driving cars. Um, there has been an issue with one car in the beginning. Off August, the car basically ran over address. Pedestrian like full stop just went through. Um, and they found out Well, it regis that her when the problem with sensor senses. But for some reason, the car decided not to stop. Okay, Just like, um, which is very sad. So have some issues with softer. There's a bunch of problems. What can we do to avoid these issues? Obviously we do testing. Okay, So it doesn't matter if you talk about cars or web applications or just small functions. The concepts always the same. You have some components, some system, and it's supposed to do some in the way of a car is supposed to stop properly your web applications supposed to display some values properly dysfunction, my dear Eyes supposed to divide some numbers, calculate Division is appeasing. How do you know if it works? Well, how do you check if you calculate the works? You try it out. Type in some numbers. Does display the correct result. If it does so good. If not, you found an issue. This is what testing does you take a system in some state precondition. You chuck some values in there, and you check if what it puts out is correct. That's basically this is a test. Okay, um, what's the issue of this piece of code? Yeah. So what input would make that fail? Yeah, if b zero exactly. In any other language. If this was not Java script, it would be an issue. This is jealous. Scripts are just puts out infinity. So if you want your coat to behave that way, it's actually correct. Might be a bug in the Java script. Language I don't know might feature. We might argue that. So we got covered. What a test. This is always the same. Input output on some system. Okay, What this testing mean now? I said you check if it works by putting some stuff into it. Actually, it's kind of kind of wrong, actually, testing is the process. Says it exit off executing a program or system with the intent of finding errors. And that's the important part. Don't test check if it works, you test to check it. It doesn't work. You're real heros. Um, basically, this is comic that says compares programmers or developers to testers and program is like I'm making something that the test is like. I'm breaking something and that's really what this is about. Why do you want to break your stuff? Because if you break it, someone else doesn't have the opportunity to, Right? Do you find a narrow? You? Hopefully we'll fix it. Planet go, go to reduction and then it won't feel production. That's good. We want that. Why do we want that? Why do you actually care if your prettiest working softly? I personally think it's a bit off our responsibility. Personal responsibility. As developers, we build stuff for the world to run. Okay, We want that stuff too. Work. We don't want to contribute to the house Gave to this program today. Okay, We want to build a nice things, and I hope you all kind of want to do that. If that noble goal doesn't cut it for you. I want to save your dignity and money because errors that live in the wild are pretty expensive. Like a rocket blowing up That costs 400 million. Pretty expensive. If you find that issue, spent half an hour testing something, finding this, you fixing that cheaper. And also, um, especially in the security scene where you have issues with security that can cause a lot of embarrassment if you have problems, security issues of box, stuff like that. So, in reality combination of both, I think they should make it clear why you want to test good. I got the motivation covered. Hopefully now we're gonna talk about the types off Harris that you can reveal with tests. Thing is, I said testing is the process off finding errors. Okay, which errors? There's a bunch of terrorists can happen many different areas. We don't have time to cover them all. So we're just gonna talk about regression tests on regression errors. What's a regression? It's something that if all if you've developed for more than a week, you've already seen that it's this situation develops and wonderful feature. You build it and that's how you test. Did you make sure it works, So you try it out, try to break it, and it doesn't break all good. You say, Push it to production. It's fine. Let it run there. You work on some other stuff. Three months later, you decide to let's try my old feature again. Like just coincidentally, you touch it. It breaks. Like what? The actual That's a regression. You have something that used to work? No, it doesn't. And everyone's like what happened that? Yeah. To avoid these kind of errors, you have regression tests. Okay, So what the people do in reality to avoid regressions? Um, I've actually worked with places or seen places where each time to have a release. Let's say you have release off some people. Big piece of spanking software. Every six months they would spend. They have had a manual test suite with several 1000 tests, and they would before each release, that would take a month with something like between 15 and 20 testers. And those testers would run a menu regression test suite for in months out of six months development time. Okay, so you're lots of features. Lots of stuff to test regression test thing is gonna take a lot of time. We develop us, we're lazy. We don't want to spend a month Cassie something Each time we released it, especially in today's world. We have to release fast. We can't really do that. And the automation. Luckily, smart people have developed a bunch of tools to allow us to automate this process. So you don't have to each time with change something manually, See if it still works can instead write your tests. My code. So you see it here? That's some I don't even know what the framework is. Basically, you write the test code and that will do this process off putting stuff in checking if it works automatically. And the good thing is, well, you spent some time developing the test beforehand. But now you can re run those tests at the press of a button. And you see that here? You don't even have to press something like the framework just detects. If anything changed, if you change your code, it's gonna ruin. Your test goes like this. Okay, so test automation can really help you avoid thes doing the same thing with testing over and over again. What, in an application, can you test so we get covered. Okay. What kind of errors? Till we check where we're gonna check them if you have some implication, Um, that's very many ways. Toe many things to actually test. The most intuitive thing would be, um, let's assume you have an implication. That mmm. Has this email input fit field where people enter the email and say Okay. And then at some point, they're gonna get sent in registration May or something like that. Okay. The intuitive thing maybe would be to have the automation system really interact with the application. You'd have the Web Web thing with the input field and button, and your friend would interact with that input field type something in automatically press a button. Now, at some point, we'll check some mail server. If a female with the correct Compton has arrived, would work. But there's not a waste, too. That's the application. You don't always have to test the whole thing together. Does always say that the whole system end to end. You can also simply take some components out of the system and test those like an isolation that, for example, in integration test, um, we're test components together. Or you noticed where you test a single component, for example, just up to make the class that sends males gets a string and it sends mail. You test that. Why do you do that? Um, two things. First of all, each off those levels, so to speak, reveals different errors again. If your unit tests, that's very good at uncovering issues that are related functionality. Some small issue with the component integration tests much better with finding issues that occur when different components don't quite work together as well as they should. Wantinto intestine Majin He's really do basically what used with us. So they're often called acceptance tests. Um, that would detect, like stuff like Is a button actually visible because it will actually try to click the button and it isn't there? Well, you found that it's a good at different things. That's a few report. Oh, no, it's not quite sorry. Um, the other thing with these levels is that they have equal cop, not equal. They have different costs associated with them. Unit tests are very easy to write, and they're very quick to run and twenties. Not so much. They're harder to write. Take longer to execute. Andi, this is what testing permits gonna come in. Who has already seen that before today. Okay? How many times like that? How many times have you seen this in the talk? Exactly. You're all gonna I'm happy that on the 1st 1 to actually show to see if you attend any test about talking at all ever again. You're gonna see this Very popular because it's true. Tells you how should we automate your house and your automation tests? We look lots of you noticed. Bunch of integration tests. Not too many anti contest. So the balance between cost and risk. What kind of issues can you find? How much money do you want to spend?