Placeholder Image

字幕表 動画を再生する

  • 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?

  • That's a refueling bumped.

  • Unless there's no left.

  • Demo instead whipped up the quick application that I would normally.

  • How do you get out of full screen?

  • No, no, it doesn't work it something.

  • Control, P come and control shift F command shift.

  • We got it.

  • I'm not a Mac user, in case you haven't noticed.

  • All right, So, um, I whipped up a quick application that would normally I prevent, attest, sweet and would normally run that we quite can't do that.

  • So instead I'm going to show you the application.

  • I will show you the tests I wrote, and you just have to imagine that they actually run.

  • Okay, If you can't do that, use your fantasy.

  • So let's look at the application.

  • First.

  • Fair word of warning.

  • I had to come up with an idea.

  • What am I gonna build that easily?

  • Testicle demonstrates a concept of testing and the only thing my brain could come up with Waas.

  • Let's make an application where you manage kittens that fight each other to death kind of thing.

  • I don't know.

  • So this is not it, because that doesn't work.

  • Sorry about that.

  • Come on, Enter.

  • Right.

  • Why doesn't it go?

  • Oh, my God.

  • Did I mention a mother?

  • Make use of Jesus what they need to do?

  • Don't do that.

  • All right?

  • What?

  • Yeah, Yeah.

  • Okay.

  • How do you copy, Command, See?

  • No, no, not enter.

  • I'm not Quincy.

  • And now no.

  • Okay.

  • Kind of.

  • Pay something here.

  • Caps lock, maybe.

  • Like that.

  • Maybe we found the bulk fruit testing.

  • Okay.

  • Okay.

  • Like that.

  • Maybe that's it.

  • Need doesn t h t Doesn't need like an Http in front maybe.

  • I don't know.

  • I shouldn't face kind of press internal.

  • What?

  • Huh?

  • I love that shit.

  • All right.

  • Sorry.

  • It's so all right, So, um Right.

  • So I made this monstrosity.

  • Um, You can see you have a list of kittens.

  • All right.

  • On.

  • Fairly simple.

  • You can also add it and to lead them.

  • Let's have a look at some kittens.

  • I don't like that.

  • I please.

  • Didn't test that.

  • Just No.

  • What's actually happening?

  • I didn't pass it on safari.

  • That's exactly right.

  • Okay, We'll just have to do it that way so a zit can see you.

  • You can put in some stuff on it.

  • Should Hopefully, yes.

  • It will update this score.

  • That tells you how murderous this Kipnis Okay, on dhe.

  • So what can you test?

  • It can do unit tests.

  • Or and 20 us.

  • Let's look, att.

  • God, not the same thing again with get up.

  • How can end up doing you, Ted, Just okay, it's dot com.

  • So I'm gonna just quickly show you what the unit tests could look like.

  • All right?

  • For that, And like I said, you will have to imagine that they just work.

  • It's me, right?

  • So there's an angle application.

  • Doesn't really matter.

  • That it is, um, just gonna have look so this what I showed you?

  • That the score that's calculated.

  • That's a perfect example for thing you can unit test.

  • Okay, because it's fairly simple.

  • Just take some values and puts out the number.

  • So let's look att what the code look looks like.

  • So that's it Doesn't really matter what the syntax like.

  • You have this component, the Baptist School Service.

  • Well has a method calculate battle points that takes a kitten and returns a number.

  • Okay.

  • And what does do then?

  • Well, if the kittens now there's nothing to return to return zero.

  • Otherwise, it takes the attributes of the kitten.

  • Gelatinous speed, blah, blah, blah and calculator better points.

  • Easy peasy.

  • So very clear what the function is.

  • Very easy.

  • Test unit test, right.

  • This is a unit.

  • A simple, simple components.

  • Simple function to test.

  • Now, let's have a look at the test.

  • It more stuff.

  • Um, still, come, move.

  • So I have to imagine repointing.

  • So this is a test file.

  • And remember what a test looks like.

  • Just come back.

  • You have a component, you have some input and you have some expected result.

  • We're going to use the tear.

  • First of all, you can see in like the line six Line nine.

  • We create our system.

  • The thing that we want to test in this case, it's a public school.

  • So it's the component we want to test calculated whatever.

  • And then we have actual test cases that start with it online.

  • 12.

  • 20.

  • Okay, let's look at the 1st 1 Line 12.

  • Um, first of all, has a name.

  • What does it do?

  • It should return to Korea battle school.

  • And then you set up your input.

  • Remember the input off the battle service function was a kittens or create one with its attributes, strength and so forth.

  • Mex line after that is the actual execution off the test where we take the function and we put stuff in.

  • This is actually let's do it part.

  • And then we record the result.

  • No.

  • The last thing we have to do, we compare the actual result with what we get back.

  • And that's the expected.

  • Expect the result that would we actually get with what we want should be can.

  • And similarly, we test if it works for them.

  • Easy peasy.

  • Quite normally, it's a knish.

  • You've just executing command in this case, and she test.

  • And this will run all your tests automatically and will also watch your files for changes.

  • And if you break the application, you're affected.

  • Then you do something bad.

  • We will show you.

  • Well, you have an issue.

  • Easy peasy.

  • Let's have a look at the end to an tests.

  • So this is the component.

  • A single component, that contest.

  • Go back to the application.

  • Um, something that is lends itself to an entire intestine Would be scenarios, like Does it displayed list in the index correctly?

  • Or when I press the lead, is it actually removed from the list?

  • Or if I added it in the edit field, is it actually updated in the index?

  • Things like that.

  • So multiple views needs the whole application.

  • That will be an entrance test.

  • And we're gonna have a look at what an end to interest looks like.

  • Angular, luckily, makes it's fairly easy to set this kind of stuff up like a certain other content of some pretty happy.

  • And you already noticed When we look at this, I expect and to end test file, it's a bit more involved.

  • I have stuff like Paige don't navigate to I mean, the concept is the same.

  • You do something and then you have an expectation and expected result.

  • Um, but you see, gets longer involved.

  • Small pages.

  • For example, in line 25 which is checked.

  • If we click the button, remove it from the list received already getting a bit like longer and needs more center Also, maintenance is harder.

  • You see that week help.

  • We get items by selecting the links in the actual HTML.

  • All right.

  • Imagine if you change that up.

  • If you give it.

  • If you see it's s selectors and change your CSS, your tests are gonna break.

  • That won't happen with your units.

  • Good.

  • How the hell I'm going to get to my presentation.

  • What was it?

  • It is Okay.

  • So that was the practical part.

  • Sorry again.

  • It didn't work out.

  • Let's summarize what we've learned today.

  • Festival programming is its own kind of hellscape, which I hope you don't have to learn too much.

  • But testing can help you with that.

  • Okay.

  • We lied about regression tests.

  • Why use them?

  • And we also talked about test automation and test louses.

  • So I hope I didn't give you too much stuff.

  • like.

  • Okay, Their risk.

  • Eshel hands.

  • Who's kind of like this was a bit too much for me.

  • Like I did Who is, like, that show of hands.

  • Okay, 12 All right.

  • Too fast.

  • Who could fall along nicely and understood most of stuff?

  • Okay.

  • Thank you.

  • And who is like, Okay, mine.

  • Um, so that's what a summary.

  • If you're interested to learn more about testing festival, just send me a message.

  • I'm always happy to help people out.

  • Like a sad I'm very passionate about testing.

  • Let me know what you think.

  • Let me know if you have some problems with testing something specific.

  • Talk over that.

  • And there's some great books out of software testing or the out of unit testing.

  • And you can also visit the Ministry of Testing Website of Great Resource is so that's it from my side.

  • You can check out the slides hosted them with reveal.

  • Jess gonna have a look at the other thing.

  • What was it?

  • Remark, Jess.

  • Got to check that out, and Yeah, we have time for questions.

  • Sure.

so thanks for having me.

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

A2 初級

フロントエンドテストの紹介 (Introduction to Front End Testing)

  • 7 1
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語