Testing is definitely a topic that deserves attention from iOS developers. It's very interesting all the flaws you can find by just testing your own code.
Thanks for the video Brian! Posting it here as both you and Sean post tutorials very actively. If you guys get a chance, could you please post a video on how to write cases to test HTTP requests and responses using something like OHTTPStubs? Thank you for all your posts. Cheers!
This topic is most important for us. I understand it clearly, because your teaching method is great :) please also make a video on test case for web services, api testing. I'm waiting for your kind video.
I never bother to learn what's that UnitTesting in Xcode for before. thanks for this! nicely put along with real-life example use case. now that you mentioned about Continous Integration, would be great if you could talk more about it in your next video, what tools you're using, and so on! Cheers
Lets Build That App Hey, Brian...this week's application assignment for school was creating an app that included UITest...Unfortunately, my teacher isn't the greatest, so see outside resources to further my education. So it was perfect timing...as I follow all of your videos anyway.
Unit testing is a way of testing one unit of a software application. A unit is the smallest piece of software that is isolated and tested as an individual for functioning. Avo Automation provides the best automated testing platform for all types of software testing, including unit testing
I really liked this video. I am relatively new to testing, and find it a big challenge sometimes, especially when it comes to UI. Can you do some more complex testing tutorial as well please?
I don't use swift, but this was a really helpful primer on unit tests! I've worked at too many companies that don't see the value in them, so I'm working hard to start integrating them into our code base
This may seem a stupid question, and I apologize in advance for it, but I'll ask anyway: In your square function you used "3" for testing the square value, but let's say one uses "2" for testing; the result must be "4". But, if someone modifies the square function and "by mistake" changes the "self * self" to "self + self", if the testing value is "2" the result will still be "4". How does it assert that my function is right?
Awesome tutorial!!! I want to learn more about Unit testing. How can we use it for TDD approach? Recently I faced this in an interview, I got selected but still not feeling comfortable regarding TDD. Can you give us any tutorial for TDD approach with swift?
I have a question as a Junior Developer: What kind of app should I bring to the app store to utilize as my resume app? How large, complicated, etc. should it be (are the good app examples that employers would like to see)? I have the basics down, the general requirements for a junior position and I have created 'mini' apps that are very simple in nature, but I don't know what I should create, or how since if it is too big I might be wasting my time (in a way 'wasting time' as in not actively working towards getting a complete app to use as a job resume). Any advice would be great :)
I would set a baseline of creating apps using core data and cloud db such as firebase. I create the paid courses on my website to help people land jobs. Go check them out, I’m sure you’ll find them useful like the rest of my students.
Thank you for the quick reply! That is great news! Will take a look at your paid courses and will try to create something around core date and/or cloud db. I really appreciate the advice :)
sooo, in this case you compare the result of your square function to a build in square function. What do you do when you have a more complex function to test? recreate the complex function in your test script and compare it against the one writen in the project? I am not really sure I can follow what you do here. Or would you manually calculate with fixed input value and then hard code the result value while comparing it against the function when given this specific input value?
I'm not sure if you watched the entire video, but at the end we test a complex function that's in our project that prints out the timeAgoString. You simply create an instance of your objects and test the function calls with some inputs and verify the output is what you expect.
i wish one day you also start teaching us android with same fun :) [but iOS - first love would remains first] BDW I am glad to tell you that whenever i do swipe on my smartphones...i notice diff apps and started dreaming coding the same programatically....Brian you have impacted so +vely....FAN OF YOUR WAY OF TEACHING
Hey Brian, how you doing? Always pushing us further, few code lines at time. Thanks for enlightening us, the mere mortal beings struggling to be relevant in this iOS universe. ;-)
Super, thanks! What code editor are you using for app development? Do you do other development (Android, web) and if so, do you use the same environment? Thanks!
Heeyy what's up Brain ! Hope you are doing well ! I love your videos. We are learning so much things. I want to ask one question. Will you do some videos about the image processing in swift or do you think ?
Lets Build That App No, not like the instagram. Like using open cv, doing corner detection , tracking object, scanning documents etc. Because there are not lots of source about swift - opencv .
Great vid man well done - only advice, step-by-step is always better, conciseness and simplicity are they keys to teaching skills. The least amount of words and points that say the most make knowledge acquirable for anyone in your medium.
Cool, chad goes at a much slower pace so it’s easier to understand. I’m not a big fan of preparing and reading from slides personally, I think I’m too lazy to actually do it.
Here is a video idea for you: Usually it is not hard to make tests. What is hard to determine is WHAT to test with unit testing. Because you don't want to test trivial things like square. What do you think of this idea? :)
If you're writing tests, a simple rule of thumb is to test every method that is public. This will help you determine what should be exposed and what should be kept private.
Woah... bryan you blew my mind!!! The square() on extension int is so cool!! But my question is, is there a reason why you did it on extension, instead of having function with arguments and returning square value??
Well, with extension you can call it from anywhere in your project and its easy to use. Functions are quite clunky. Also, the extension makes for an excellent example of how to implement a simple Unit Test.
Were test-driven development and agile common practices in your previous jobs? If they were, how did you implement tests in a short iterative development cycle?
Your videos are excellent and great on teaching Swift. Please continue your hard work! Truly appreciate. Are you gonna teach Android in the future? If not, any recommendations who has best teaching on Android?
Thanks Brian for all the amazing tuts. what should one unit test in a typical MVC iOS app, what parts should be covered by unit tests other than model layer and business logic?
What if there is a bug in your unit test code, and do you have to do a unit test to test your unit test code, and then do you have to unit test your unit test ... infinitum or am I missing the point?
Well there's always potential for bugs so testing isn't going to be 100% bug free most of the time. Furthermore, writing tests also makes you write code thats simple and easy to test. In the long run, it will save you many headaches.
Hey Brian I am implementing unit test case in my project but I am facing issue while importing the testable module getting warning as "File 'MyProjectNameTests.swift' is part of module 'MyProjectName'; ignoring import". My project includes the both objective-c and Swift code and my test case target is in Swift. Please give me resolution if any.
If you watch the Instagram series at www.letsbuildthatapp.com/course/instagram-firebase, you'll see how we instantiate all of our controllers and use them directly in our tab bar. In each of our controllers, we apply custom code in viewDidLoad.
Thank you for the video. I have worked for start up as “Internet of things developer” where my contribution was to design a prototype for our client where i programmed(C language) a microcontroller with sensor which is connected to AWS Internet of things cloud platform for a duration of 8 months which includes sending the sensor data from device to AWS IoT cloud. Now the company is not operating. Since I have less experience I now work in different domain to take care of myself as well as pay my bills. I am also learning python programming language from Udemy and also completed 6 small projects like building a website using Python flask, Open CV,Desktop database applcaition,Creating webmaps using Folium,Data analysis using pandas,numpy,webcam motion detector using webcam, Interactive Data Visualization with Bokeh. My query is, as a self taught programmer ,I would like to know from experience person like you that, will these projects help me land a job. I believe I can make a comeback and work even though I have gap in my career. But I would like to get suggestions on how can I apply with these skills in my resume,the duration of these above projects I can put in my profile. Also how can i start unit testing. Please correct me and suggest ,if I asked anything wrong.
Get involved in the open source community, Do consulting for small businesses , Build apps for different devices and use these different areas to try and network with people. You need to build your self a daily training routine so as to become a master in certain techniques the way an athlete does. Are you looking really to work with higher level programs or lower level such as embedded systems.
I'm trying to update the course with at least one lesson a day. Apologies for not uploading a lesson yesterday. There will be two lessons uploaded today, episode 16 should already be available. Again, sorry for the wait.
I do have one more question, if I may. If you happen to have a list (which I haven't been able to find online) of 'how proficient' someone needs to be in Swift as a language to say they can code as a Novice Xcode/Swift programmer? (With this I mean, are there certain things I need to know other than the basics of Types, Variables, Methods, Classes, If+For Loops, Switches, Strings, Arrays, Dictionaries, etc.?) Been looking online what would be considered 'proficient' as a Junior iOS Developer. I know that API's is something everyone needs to look up, but what would you say, I a junior Developer should know before applying concerning Swift as a programming language? Again, any advice would be great :) [ps. I have been doing CodeFights.com]
Hey Brian. Nice job. Can you please share Spotify demo and tinder demo as a course I saw it on your device :) Testing is a big part in the development and we should focus more on that but We have so much more to learn on iOS and Swift app development e.g. if the app is inactive and goes to the background what kind of stuff can we do at that state etc.. . Can you please make more apps that is the best way to learn. An application where we have different UIViewControllers and other important stuff from Apples framework involved like MapKit etc. would be perfect. Thanks
Yeah, unfortunately I'm a one man team here and preparing/recording everything is more than a full time job. We'll see what I can get done on my starbucks espresso coffee drinks.
Hi there Brian, thanks for the great video, very informative. Just a tiny bit of constructive criticism. The audio compression ration of your voice is set veeeery high:) See if you can tone that setting down a bit - it will make your voice a bit more natural and reduce over-emphasizing of other unwanted noise. Again, thanks for the video, I especially like the fact that you use a very real world application!
That sounds like something that would best be suited to an automated testing tool like Selenium IDE which is used for UI testing and is available for Firefox and Chrome.
This is a very underserved topic. Thanks for putting out a video on it. All devs need to know this.
Testing is definitely a topic that deserves attention from iOS developers. It's very interesting all the flaws you can find by just testing your own code.
Thanks for the video Brian!
Posting it here as both you and Sean post tutorials very actively.
If you guys get a chance, could you please post a video on how to write cases to test HTTP requests and responses using something like OHTTPStubs?
Thank you for all your posts. Cheers!
rumitification good request)
Mera number hai koi
Thanks for the video
I know this video is three years old, but it's very educational about this topic of unit testing. Thank you!
Fantastic and quick introduction to something that is whispered in hushed tones amongst junior developers.
First time I see such a simple way for the explanation. Great!
Not aa iOS programmer here but your video explanation is so clear that I understand the concept anyway. Thank you!
Not even coding in swift, but very interesting to watch. This channel is awesome. Talking about very important stuff for newbies. Much appreciated
Yeah this channel goes into more useful advanced topics that beginners should be aware of.
Very nice! I like the new effects! It gives your videos a polished look
Thanks Marc, I'm still figuring my way out around Adobe Premiere.
Nice, elaborate and to the point. Need some advance examples but for gaining basic understanding this is superb.
Brian Voong you are to iOS what Andrew Ng is for Maching Learning : concise, clear, and brilliant !
First I heard of built in test functions. Reminds me of sales force development. Thank you.
Yep, all enterprise companies have very robust testing infrastructure that produces reliable code for their customers that are paying millions.
This topic is most important for us. I understand it clearly, because your teaching method is great :)
please also make a video on test case for web services, api testing.
I'm waiting for your kind video.
I never bother to learn what's that UnitTesting in Xcode for before. thanks for this! nicely put along with real-life example use case. now that you mentioned about Continous Integration, would be great if you could talk more about it in your next video, what tools you're using, and so on! Cheers
Perfect timing as always! Thank you Brian...much appreciated!
Perfect timing? Exam? Job interview? You've piqued my interest.
Lets Build That App Hey, Brian...this week's application assignment for school was creating an app that included UITest...Unfortunately, my teacher isn't the greatest, so see outside resources to further my education. So it was perfect timing...as I follow all of your videos anyway.
woah... from 7yrs ago instagram looked much the same !
Some of your videos made me convince to learn programming. Thank you! :)
Hey thats great, hope you can see how simple it is when starting from scratch and building up a full product.
Unit testing is a way of testing one unit of a software application. A unit is the smallest piece of software that is isolated and tested as an individual for functioning. Avo Automation provides the best automated testing platform for all types of software testing, including unit testing
I really liked this video. I am relatively new to testing, and find it a big challenge sometimes, especially when it comes to UI. Can you do some more complex testing tutorial as well please?
Yeah, there are many aspects of testing that can be applied to apps. I'll plan out some more videos on this.
Made this topic clear to me in a just few minutes. Many thanks!
I don't use swift, but this was a really helpful primer on unit tests! I've worked at too many companies that don't see the value in them, so I'm working hard to start integrating them into our code base
Thanks, Brian. This was excellent!
Yes please! Can you make unit testing videos! Especially for networking and requests and model objects as well!!
Yeah I think I'll make a unit test video on network requests.
Awesome video. Would love to see more about advanced unit testing
Yeah, looking to put some more testing videos out.
logically structured and informative presentation...thanks
Wooow! I was waiting for this!! Super!
Glad to have finally been able to make a video on Unit Testing as it's very important in the real world of software development.
Hey do you think
I can use this to make sure all my products are priced correctly on third party apps?
Great video Brian, I always thought that testing is tedious but this really makes it logical and appealing.
I have a second interview in about two hours, thanks for this video! Wish me luck!
This may seem a stupid question, and I apologize in advance for it, but I'll ask anyway:
In your square function you used "3" for testing the square value, but let's say one uses "2" for testing; the result must be "4". But, if someone modifies the square function and "by mistake" changes the "self * self" to "self + self", if the testing value is "2" the result will still be "4". How does it assert that my function is right?
Awesome tutorial!!! I want to learn more about Unit testing. How can we use it for TDD approach? Recently I faced this in an interview, I got selected but still not feeling comfortable regarding TDD. Can you give us any tutorial for TDD approach with swift?
I have a friend that does testing for work and he's going to be coming out with his own channel so stay tuned.
I have a question as a Junior Developer: What kind of app should I bring to the app store to utilize as my resume app? How large, complicated, etc. should it be (are the good app examples that employers would like to see)? I have the basics down, the general requirements for a junior position and I have created 'mini' apps that are very simple in nature, but I don't know what I should create, or how since if it is too big I might be wasting my time (in a way 'wasting time' as in not actively working towards getting a complete app to use as a job resume). Any advice would be great :)
I would set a baseline of creating apps using core data and cloud db such as firebase. I create the paid courses on my website to help people land jobs. Go check them out, I’m sure you’ll find them useful like the rest of my students.
Thank you for the quick reply! That is great news! Will take a look at your paid courses and will try to create something around core date and/or cloud db. I really appreciate the advice :)
Those pesky "junior developers"! Always breaking all the code that only I contribute to!
Indeed, 100% of bugs were never my fault :)
We can't fully blame junior developers unless we taught the concept and they didn't care
I would *love* to see more videos about Unit Testing! Keep it up, please!
sooo, in this case you compare the result of your square function to a build in square function. What do you do when you have a more complex function to test? recreate the complex function in your test script and compare it against the one writen in the project? I am not really sure I can follow what you do here. Or would you manually calculate with fixed input value and then hard code the result value while comparing it against the function when given this specific input value?
I'm not sure if you watched the entire video, but at the end we test a complex function that's in our project that prints out the timeAgoString. You simply create an instance of your objects and test the function calls with some inputs and verify the output is what you expect.
Does the application needs to be built for the unit test to run? OR it’s just like calling functions in our code with some predefined data?
Learned about Unit Tests and that you can create extensions on primitive types. I'm new to Swift haha. By the way, your content is awesome!
super like this video and much needed....waiting for your UI unit test video
i wish one day you also start teaching us android with same fun :) [but iOS - first love would remains first]
BDW I am glad to tell you that whenever i do swipe on my smartphones...i notice diff apps and started dreaming coding the same programatically....Brian you have impacted so +vely....FAN OF YOUR WAY OF TEACHING
That's excellent, I also find myself trying to break down the apps I use into components I can build. It's a lot of fun.
Hey Brian! Are you going to WWDC this year and planning to make a video about it?
Hey Tom, unfortunately my budget doesn't allow for a WWDC ticket. Perhaps I'll attend alt conf or some other nearby meetup.
Excellent explanation!
Hey Brian, how you doing? Always pushing us further, few code lines at time. Thanks for enlightening us, the mere mortal beings struggling to be relevant in this iOS universe. ;-)
Super, thanks! What code editor are you using for app development? Do you do other development (Android, web) and if so, do you use the same environment? Thanks!
Heeyy what's up Brain ! Hope you are doing well ! I love your videos. We are learning so much things.
I want to ask one question.
Will you do some videos about the image processing in swift or do you think ?
When you say image processing are you referring to filters like instagram? I've written the code before and I could share it later on.
Lets Build That App No, not like the instagram. Like using open cv, doing corner detection , tracking object, scanning documents etc. Because there are not lots of source about swift - opencv .
I see, I've never looked into opencv before, perhaps one day I'll do some research.
Lets Build That App
Okey, thank you Brain. we love you. You are awesome !
Could you make a video about your setup? I'm really curious what tech you're using. Love your videos btw ^^
My development setup or recording setup?
Lets Build That App Both but I'd be more interested in your development setup
Thanks a lot for clear and easy explanation!!!!
Great vid man well done - only advice, step-by-step is always better, conciseness and simplicity are they keys to teaching skills. The least amount of words and points that say the most make knowledge acquirable for anyone in your medium.
Examples to check out concretely would be anything from Chad Darby - dudes got the simple down
Cool, chad goes at a much slower pace so it’s easier to understand. I’m not a big fan of preparing and reading from slides personally, I think I’m too lazy to actually do it.
very nice and easy to follow
Here is a video idea for you: Usually it is not hard to make tests. What is hard to determine is WHAT to test with unit testing. Because you don't want to test trivial things like square. What do you think of this idea? :)
If you're writing tests, a simple rule of thumb is to test every method that is public. This will help you determine what should be exposed and what should be kept private.
Woah... bryan you blew my mind!!! The square() on extension int is so cool!! But my question is, is there a reason why you did it on extension, instead of having function with arguments and returning square value??
Well, with extension you can call it from anywhere in your project and its easy to use. Functions are quite clunky. Also, the extension makes for an excellent example of how to implement a simple Unit Test.
I love you bryan
Were test-driven development and agile common practices in your previous jobs? If they were, how did you implement tests in a short iterative development cycle?
This tutorial is super!!. Thank you, I understand it very easy
very explanatory! thanks a lot.
Is there an iOS Objective-C channel which is as good as this one?
Your videos are excellent and great on teaching Swift. Please continue your hard work! Truly appreciate. Are you gonna teach Android in the future? If not, any recommendations who has best teaching on Android?
Thanks Brian for all the amazing tuts.
what should one unit test in a typical MVC iOS app, what parts should be covered by unit tests other than model layer and business logic?
Very very clear! Thanks a lot!
excuse me, can you help me, i'm having a problem about error domain 9806 and 9807 requires a certificate of trust
thank you
Excellent.
@@LetsBuildThatApp I have granted permission in info.plist file but failed, do you have any suggestions for me
Thanks for the video. This enlightened us on why unit test required and how to write test cases. Could you teach us how to write UITests and Mocks?
Very good explanation
never knew test cases this much easier. Thanks for knowledge sharing
5*
I can say only one thing.. He is a swift god
+Vijay Reddy oh rly
What if there is a bug in your unit test code, and do you have to do a unit test to test your unit test code, and then do you have to unit test your unit test ... infinitum or am I missing the point?
Well there's always potential for bugs so testing isn't going to be 100% bug free most of the time. Furthermore, writing tests also makes you write code thats simple and easy to test. In the long run, it will save you many headaches.
I've just got a boss who knows how to break things. Not sure how he does it, but he always finds my bugs LOL
If you are a Qa/test software engineer, is this the work the person would do?
thanks Brian, very usefull
Thanks for creating this video.
Sean Allen and Brian Basically The professor we dint have in collage
write code to test code? what if you write bad tests?
Awesome tutorial...Please explain about Automated UI testing in xcode objective-c
Can you make a video for CI/CD using JENKINS,GIT,
Sweet and right to the point.
No fluff, just pure content.
Hey Brian I am implementing unit test case in my project but I am facing issue while importing the testable module getting warning as "File 'MyProjectNameTests.swift' is part of module 'MyProjectName'; ignoring import". My project includes the both objective-c and Swift code and my test case target is in Swift. Please give me resolution if any.
Also I am able to access some of swift files from my projects directly.
You made it when I wanted to ask you to do such a video
can you plz put some more content on TDD. thank you very much awesome video.
Will the tutorial use storyboard for design or all through code
All the tutorials I produce use the simple code approach. Once you get the hang of it, you'll find it to be quite enjoyable.
I started use UI programmatically after your UA-cam seri. It's a wonderful change in my iOS development. Thanks Brian.
How do we create tests for Watch App?
Could you do some Unit and UI testing tutorials?
Thanks Brian! Do we need to create separate file for each test? Or do we have to create file for group of tests, or file per logical module?
Hi Brian, can you make video about XMPP Chat services? At least quick information :)
Which hardware is using in unit testing
great work
And how to create UIViewController without storyboards so that viewDidLoad() is called?
If you watch the Instagram series at www.letsbuildthatapp.com/course/instagram-firebase, you'll see how we instantiate all of our controllers and use them directly in our tab bar. In each of our controllers, we apply custom code in viewDidLoad.
Wow, thanks for reading my comment! I'm watching the tutorial right now. Thank you so much!
how you can display your phone on the PC? Some remote control ?
Thank you for the video. I have worked for start up as “Internet of things developer” where my contribution was to design a prototype for our client where i programmed(C language) a microcontroller with sensor which is connected to AWS Internet of things cloud platform for a duration of 8 months which includes sending the sensor data from device to AWS IoT cloud.
Now the company is not operating. Since I have less experience I now work in different domain to take care of myself as well as pay my bills. I am also learning python programming language from Udemy and also completed 6 small projects like building a website using Python flask, Open CV,Desktop database applcaition,Creating webmaps using Folium,Data analysis using pandas,numpy,webcam motion detector using webcam, Interactive Data Visualization with Bokeh.
My query is, as a self taught programmer ,I would like to know from experience person like you that, will these projects help me land a job. I believe I can make a comeback and work even though I have gap in my career.
But I would like to get suggestions on how can I apply with these skills in my resume,the duration of these above projects I can put in my profile.
Also how can i start unit testing.
Please correct me and suggest ,if I asked anything wrong.
Get involved in the open source community, Do consulting for small businesses , Build apps for different devices and use these different areas to try and network with people.
You need to build your self a daily training routine so as to become a master in certain techniques the way an athlete does.
Are you looking really to work with higher level programs or lower level such as embedded systems.
Thanks for the video Sir!!
which language are you using?
You are the best!! Thank you so much!!
Thanks Joyce, testing is a very fun topic.
how often do you update the instagram class?
I'm trying to update the course with at least one lesson a day. Apologies for not uploading a lesson yesterday. There will be two lessons uploaded today, episode 16 should already be available. Again, sorry for the wait.
Thanks Brian!
good explanation
I do have one more question, if I may. If you happen to have a list (which I haven't been able to find online) of 'how proficient' someone needs to be in Swift as a language to say they can code as a Novice Xcode/Swift programmer? (With this I mean, are there certain things I need to know other than the basics of Types, Variables, Methods, Classes, If+For Loops, Switches, Strings, Arrays, Dictionaries, etc.?) Been looking online what would be considered 'proficient' as a Junior iOS Developer. I know that API's is something everyone needs to look up, but what would you say, I a junior Developer should know before applying concerning Swift as a programming language? Again, any advice would be great :) [ps. I have been doing CodeFights.com]
Hey Brian. Nice job. Can you please share Spotify demo and tinder demo as a course I saw it on your device :)
Testing is a big part in the development and we should focus more on that but We have so much more to learn on iOS and Swift app development e.g. if the app is inactive and goes to the background what kind of stuff can we do at that state etc.. . Can you please make more apps that is the best way to learn. An application where we have different UIViewControllers and other important stuff from Apples framework involved like MapKit etc. would be perfect. Thanks
Yeah, unfortunately I'm a one man team here and preparing/recording everything is more than a full time job. We'll see what I can get done on my starbucks espresso coffee drinks.
Please one video on UI testing
Thank you so much... This is very precious 😀
Great, thanks a lot!!
what if you messed up your unit test?
U fix it
@@LetsBuildThatApp but I ment if it was possible for it to go to production if no one catched it.
Hi there Brian, thanks for the great video, very informative. Just a tiny bit of constructive criticism. The audio compression ration of your voice is set veeeery high:) See if you can tone that setting down a bit - it will make your voice a bit more natural and reduce over-emphasizing of other unwanted noise.
Again, thanks for the video, I especially like the fact that you use a very real world application!
Thank you for the video, is great and it help a lot =)
Hey, can you please tell us how to write user interface testing for google sign in?
That sounds like something that would best be suited to an automated testing tool like Selenium IDE which is used for UI testing and is available for Firefox and Chrome.
Thank you
Wait. I can find the instagram tutorial anywhere. is it coming or? i trying to learn how to make a profile account with public and private users
oh you have to pay. that sucks but get your money up i see you.
Yep, I think you'll enjoy the course if you like learning about iOS development.
How we can test functions wich return Void?
Sometimes the TC code will introduce bugs which go away when you remove the code.
Thank you for this brilliant and objective intro to XCTests
I really like this video!
We really like it too!