Testing GUI Apps - What to test? How to test it? Mini Coding Course for Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 มิ.ย. 2024
  • In this mini course, we will learn all about automated software testing with a fun coding exercise!
    We will take a Kivy GUI application, and we will use it to learn what to test and how to test it!
    By the end of this video, you will understand why testing is so important and how it helps us write better software. Therefore I highly encourage you to warm up your fingers and code along with me! 🙂🙂🙂
    The main concepts you'll learn:
    1. Static Analysis
    2. Dynamic Analysis
    3. Automated Testing
    4. Unit testing a Kivy GUI Application
    ⏰ TIME STAMPS ⏰
    -----------------------------------------------------------
    00:00 - introduction
    00:38 - download example app
    00:56 - when do we write tests?
    01:22 - run example app and install dependencies
    02:29 - review example app
    04:00 - static analysis with pylint
    04:58 - dynamic analysis
    06:16 - coding unit tests
    07:23 - what is asserting?
    07:49 - software testing checklist
    08:02 - test existence of software elements
    08:24 - test if app exists
    10:10 - test if GUI widgets exist
    15:36 - test is assets (image files) exist
    19:20 - test content of software elements
    19:32 - test data types
    22:15 - test ideal input
    30:16 - test accidental input
    32:16 - test boundaries of valid input
    32:53 - test mathematically wrong input
    34:52 - test malicious input
    37:02 - intro to SQL injection
    37:56 - thanks for watching!
    🎥 USEFUL TUTORIALS OF MINE 🎥
    -----------------------------------------------------------
    ⭐ Anaconda Beginners Guide for Linux and Windows:
    • Anaconda Beginners Gui...
    ⭐ Learn Classes and Objects for Beginners:
    • Python Classes and Obj...
    ⭐ Practice classes - Forest of Objects OpenCV Exercise:
    • Draw a Forest of Rando...
    ⭐ OOP Class Inheritance and Private Class Members - Python for Beginners!
    • OOP Class Inheritance ...
    ⭐ Simple Python App with Kivy - Step by Step GUI Tutorial
    • Simple Python App with...
    ⭐ Mobile App with KivyMD - Python GUI for Android:
    • Mobile App with KivyMD...
    ⭐ Python TDD Workflow - Unit Testing Code Example for Beginners:
    (please read the pinned comment in this video!! it's important!)
    • Python TDD Workflow - ...
    ⭐ If _name_ == "__main__" for Python Developers:
    • If __name__ == "__main...
    ⭐ List Comprehension - BEST Python feature !!! Fast and Efficient:
    • List Comprehension - B...
    #python #pythonprogramming #pythontutorial #unittesting #unittest #softwaretesting #softwaredeveloper #softwareengineer #softwaredevelopment #computerscience #dynamicanalysis #kivy #pylint #testing #coding #codingtutorial #programming #programmingforbeginners #learnprogramming #learnpython #learncoding
    💻 STARTER FILES 💻
    -----------------------------------------------------------
    github.com/MariyaSha/Automate...
    🤝 Connect with me 🤝
    -----------------------------------------------------------
    🔗 Github:
    github.com/mariyasha
    🔗 Discord:
    / discord
    🔗 LinkedIn:
    / mariyasha888
    🔗 Twitter:
    / mariyasha888
    🔗 Blog:
    www.pythonsimplified.org
    💳 Credits 💳
    -----------------------------------------------------------
    ⭐ Beautiful titles, transitions, sound FX:
    mixkit.co
    ⭐ Beautiful icons:
    flaticon.com
    ⭐ Beautiful graphics:
    freepik.com
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 77

  • @magowiz82
    @magowiz82 10 หลายเดือนก่อน +12

    To be honest I expected you would have used an automated testing software to make your tests interact directly with your application gui. Probably since this is a general video about testing is better like this, I don't know of you or your followers are interested and if they knows about this kind of software, by the way I'm using for my kivy/kivymd application this combination to have pretty good automated tests:
    - telenium : application that is able to interact with kivy gui using xpath to select widgets
    - pytest : a test suite for python
    - pytest-bdd : which is a plugin for pytest that implements bdd and permits you to use gherkin language to define your tests step and bind python methods to your gherkin steps.
    I hope this information could be useful.

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน +7

      Thanks for the AWESOME Kivy testing tips! 😃 Much appreciated!
      Telenium is definitley on my list, I will cover it in a future series of a Kivymd app from head to toe (or tail... should I say 😉).
      For the current video, I wanted a general testing tutorial that covers what to test and how to test it regardless of the GUI library we're using 😃
      Now that it's out of the way - we can move on with more complex/specific stuff.
      Thanks again! Pinning your comment to the top! Cheers! 🙂🙂🙂

    • @zzzkeepgrindding
      @zzzkeepgrindding 7 หลายเดือนก่อน

      ​@@PythonSimplified@Python Simplified I really like the python course you explain it very good and easy. love tour vids

  • @bombus1340
    @bombus1340 10 หลายเดือนก่อน +7

    +1 for a video about SQL Injection! I've seen videos about what to do to avoid them, but nobody demonstrates examples for Injections and it always feels like "avoid it, because I say so". I'd like to see exaples for possible Injections attacks to get the full picture.

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน +4

      Great! I've seen so many requests already, it's safe to assume a simplified tutorial is needed! 😉
      We'll do the following: I'll design an example webapp that each of us can clone and experiment with on our own device. That way, we are not attacking an actual server, rather than our own local environment.
      Thank so much for the request! I'll start conceptualizing a very nice tutorial 🙂

  • @rahmanabdullah1049
    @rahmanabdullah1049 9 หลายเดือนก่อน +2

    You make things so simple to understand and apply. Thank you!

  • @wagnerjosegertrudesmuitoal3638
    @wagnerjosegertrudesmuitoal3638 10 หลายเดือนก่อน +1

    This is the best testing video I've ever seen, it's a very comprehensive and secure set of tests, and the way your eyes light up when you talk about programming is unforgettable, thank you!

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน +1

      Yeeeeeyyy!! Thank you so much for the incredible feedback!! Super happy you found it helpful! 😃😃😃

  • @carstenjensen3123
    @carstenjensen3123 10 หลายเดือนก่อน +4

    You are absolutely sensational at explaining complex stuff in a straightforward way. Thanks for this video. Now, could you please make some videos about some simple Kivy and Kivymd apps and getting them to run on android?

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน +1

      Thank you so much! I already have quite a bunch of simple GUI tutorials for kivy/kivymd!
      Both for Android and Desktop 😉
      Here's the list:
      🥝 Mobile App with KivyMD - Python GUI for Android - Binary to Decimal Converter:
      th-cam.com/video/ah3JeHAfM0M/w-d-xo.html
      🥝 Convert Python KivyMD App to Android .apk:
      th-cam.com/video/VsTaM057rdc/w-d-xo.html
      🥝 Simple Python App with Kivy - Step by Step GUI Tutorial:
      th-cam.com/video/YDp73WjNISc/w-d-xo.html
      My next major project would be with kivymd (they actually just released new id designation commands for Python purists like myself 🤩).
      This project will include a step by step codealong, automation with Telenium and unittest/pytest, as well as deployment to several mediums (I've heard it can be adapted into a web app, I need to test is it works.
      BTW, the folks behind Kivymd are viewers of this channel, you'll see them once in a while in the comments 🙂

  • @taskhopper
    @taskhopper หลายเดือนก่อน

    Thank you so much for this tutorial honestly. You're such a lifesaver!

  • @panzer7773
    @panzer7773 10 หลายเดือนก่อน +1

    The clarity of your voice is very eargasmic on top of that you are such a beauty! And... U're so intelligent too?! What the heck! U are best, I love u my Cutie Pie !! Hahhaha❤😂

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน

      hahahaha thank you so much for the lovely comment! 😀

  • @jeuxmathinfo9578
    @jeuxmathinfo9578 10 หลายเดือนก่อน +2

    Very useful! Thanks for sharing !!! 🌹

  • @paulthomas1052
    @paulthomas1052 10 หลายเดือนก่อน +3

    Thanks for another great video - I found it easy to follow and very useful.

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน +1

      Thank you so much!! glad you like it! 🙂🙂🙂

  • @tonym5857
    @tonym5857 9 หลายเดือนก่อน

    Great video 👏👏👏 testing is mandatory 💪

  • @valerieocanaable
    @valerieocanaable 4 หลายเดือนก่อน

    The cat was comic relief. I love it!

  • @Chernikru
    @Chernikru 10 หลายเดือนก่อน +1

    I love your English so much. This pronunciation is just something. Usually I don't even understand familiar words, but this is different. And of course, the explanation is excellent. Oh yes, you are also an incredible cutie and a very charismatic person.)
    P.S.
    Надеюсь гугл переводчик хорошо справился со своими обязанностями

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน

      а зачем гугл переводчик? я прекрасно читаю и говорю по русски 😉
      большое спасибо за коммент! 🙂

    • @Sinke_100
      @Sinke_100 10 หลายเดือนก่อน +1

      Yes, I like voice too, it's so melodic and full of joy

  • @hamed6899
    @hamed6899 9 หลายเดือนก่อน

    You are a really good teacher.

  • @user-sf4uw5wp6e
    @user-sf4uw5wp6e 9 หลายเดือนก่อน

    Fantastic video, need a tutorial about flet framework

  • @_isDev
    @_isDev 10 หลายเดือนก่อน +2

    amo a esta mujer! gracias por los tutoriales!

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน

      Muchas gracias Ismael!! 🙂

  • @lewisjade
    @lewisjade 10 หลายเดือนก่อน +1

    This is incredible
    I ❤ it!

  • @haplo666
    @haplo666 10 หลายเดือนก่อน +2

    YES YES YES, please create a vidoe with SQL malicious inputs!!!

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน

      Fantastic!! We got 2 requests in the comments already - 3 more and you got it! ;)

  • @erickleuro6159
    @erickleuro6159 10 หลายเดือนก่อน +1

    loving the cat at 23:16

  • @minaahosaam7961
    @minaahosaam7961 10 หลายเดือนก่อน

    Good video and this great App

  • @carlospitcher4335
    @carlospitcher4335 10 หลายเดือนก่อน +3

    Excellent content!
    now i want to know more about SQL injection!

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน +2

      Thank you so much! A few more viewers mentioning SQL Injection - and you got it! 😉
      (it's so easy, you will never believe it!!!)

    • @magowiz82
      @magowiz82 10 หลายเดือนก่อน +2

      Do I have to mention SQL injection to ask you to talk about SQL injection in another video about SQL injection? OK I mentioned three times, I hope it counts like this 😂

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน

      @@magowiz82 hahahahaha now I must!! Don't worry, I am definitley filming this.
      It's highly unusual to see so many comments about something I've mentioned at the end of a 38 minute-long tutorial 🤪
      I'll start working on it shortly, katching up with school in the next few days and then I'll move on with SQL Injection mad scientist simplified video 🙂

  • @alexcaruajulca
    @alexcaruajulca 10 หลายเดือนก่อน +1

    thanks for the subtitles

  • @user-ws4nz8fu6z
    @user-ws4nz8fu6z 10 หลายเดือนก่อน +1

    Спасибо :)

  • @gemini1053
    @gemini1053 10 หลายเดือนก่อน +1

    Great video tutorial.

  • @user-td1ro3lp4o
    @user-td1ro3lp4o 7 หลายเดือนก่อน

    please post your content regularly

  • @rahneshin752
    @rahneshin752 10 หลายเดือนก่อน +1

    ❤❤

  • @ibrahimmoawadibrahim7332
    @ibrahimmoawadibrahim7332 9 หลายเดือนก่อน

    Great

  • @gantebang
    @gantebang 6 หลายเดือนก่อน

    “Pie-thag-re-um” i got you 🤓

  • @dsrealmofmeme
    @dsrealmofmeme 9 หลายเดือนก่อน

    Hey Mariya, love from India. Can you please make a tutorial of making a 3d realistic game in python?

  • @ricardodeoliveiraalves339
    @ricardodeoliveiraalves339 8 หลายเดือนก่อน

    oh trem bunito essa muié... e ainda é programadora e inteligente!

  • @diwakar_tsn
    @diwakar_tsn 10 หลายเดือนก่อน +1

    As always ❤🔥

  • @anthoniG
    @anthoniG 9 หลายเดือนก่อน

    Was rather hoping it would be testing for QT (either PyQT or PySide)

  • @nalinperera5754
    @nalinperera5754 10 หลายเดือนก่อน +1

  • @Sinke_100
    @Sinke_100 10 หลายเดือนก่อน +1

    Mariya, I didn't download the code, but from watching the video when I see alot of elifs I wonder if perhaps is cleaner solution to it?
    def error_check(a, b, c):
    l = [a, b, c]
    l = [i for i in l if i]
    d = {0:'nothing provided', 1:'please enter one more side', 3:'you don\'t need me'}
    x = None if len(l) == 2 else d[len(l)]
    return x
    error = error_check('3', '3' , '')
    if not error: print('This is where you call another function that handles calculations') something like this perhaps

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน +1

      Cleaner solution is always better! Fantastic refactoring, Sinisa!!! (As usual! 🤪) much appreciated! 😃

    • @Sinke_100
      @Sinke_100 9 หลายเดือนก่อน

      Now that I cloned and try your app, here is my solution:
      def callback(self, this_button):
      '''
      a method executed each time the submit button is pressed
      '''
      self.message.text = self.pythagorean()
      def pythagorean(self):
      a = self.input_a.text # leg
      b = self.input_b.text #leg
      c = self.input_c.text # hypotenuse
      x = len([i for i in (a,b,c) if i])
      d = {0:"oops! no input was recieved! please enter 2 side lengths to get the 3rd!",1:"please enter one more side length to get the third!",2:False,
      3:"if you already know ALL sides then you don't need me!"}
      if d[x]: return d[x]
      missing_index = [i for i,j in enumerate([a,b,c]) if not j][0]
      lh = lambda x,y: str((float(x)**2+float(y)**2)**(1/2))
      ll = lambda x,y: str((float(y)**2-float(x)**2)**(1/2))
      d = {0: lambda: ll(b,c),1:lambda: ll(a,c),2:lambda: lh(a,b)}
      return d[missing_index]()

  • @vishnusudheer6049
    @vishnusudheer6049 8 หลายเดือนก่อน

    Hi can you help make a program which tracks drones using webcam of pc in python

  • @MrPennywise1540
    @MrPennywise1540 7 หลายเดือนก่อน

    I have a Python code that use Tkinter to make a GUI. This code edit images. Now, I'm developing my webpage with Django, and I want to run the GUI code in my page. I hoped I could sove it with PYSCRIPT, but it's not compatible. I'm in a dead end. Can someone give me an advice?

  • @shakhnozahalilova3249
    @shakhnozahalilova3249 10 หลายเดือนก่อน +1

    Hi Mariya, what's up?
    Mariya, Could you tell me about how to build a gui program that locks an exe file with given password by user and when user attempts to enter that exe app, a form should ask for a password to enter that exe app?
    No matter, in which programming language is needed to do that
    So, plz give me your advice on how to build that kind of app

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน +2

      I actually have the perfect set of tutorials for you! 😁 (it rarely happens!!! hahaha)
      To lock your setup file with a password (not .exe, but the actual setup wizard that leads to your .exe) you can follow this tutorial:
      ⭐ Convert GUI App to Real Program - Python to exe to setup wizard
      th-cam.com/video/p3tSLatmGvU/w-d-xo.html
      then at minute 19:44 just set the password you'd like instead of leaving it blank.
      In addition, I highly recommend following the tutorial of the example GUI app we are converting.
      It uses a GUI library called Tkinter, which is very traditional and popular in Python. That way you can learn many principles of app making and then apply it on your own ideas.
      Here's a link:
      ⭐ Create GUI App with SQLite and Tkinter (Random Recipe Picker):
      th-cam.com/video/5qOnzF7RsNA/w-d-xo.html
      Good luck and I hope it helps! 🙂🙂🙂

    • @shakhnozahalilova3249
      @shakhnozahalilova3249 10 หลายเดือนก่อน +1

      @@PythonSimplified Yeah(Mariya), thanks. The interesting part of that is I've asked for it from a person who works at Facebook as senior software engineer, and he said, "It's kind of hard thing to do." And he also replied that, Because what you're actually requiring for requires good knowledge of assembly and other things to do

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน

      Usually yes - but luckily I had a chance to simplify the entire process already!
      I've done the hard part so you guys don't need to deal with it on your end 😉
      (Also, maybe share it with the Facebook guy if he doesn't like to deal with assembly 🤪 hahahaha)

    • @shakhnozahalilova3249
      @shakhnozahalilova3249 10 หลายเดือนก่อน +1

      @@PythonSimplified yeah. Mariya, he's older than me and he has a family. I'm sixteen. And I asked for him "why not the most developers want to do this", and he replied me like "Not everyone want to do, because they have a their own job and they don't want spend their time on these kind of things". This so inspiring for me to make great effort to become such this great developer in the future.(I've never talked to such this kind of a person who is ready answer questions sincerely,people who are interested in programming or IT, generally)

    • @PythonSimplified
      @PythonSimplified  10 หลายเดือนก่อน +2

      ​@@shakhnozahalilova3249 senior developers tend to dismiss juniors with "read the manual" type of answers. They can explain it in 1 minute or send you on a long Google-search journey to maybe find an answer. I think it's silly and unprofessional, but then... I'm not a senior developer, so maybe it's an acquired quality 😅 hahahaha

  • @LastdayPhysics3960
    @LastdayPhysics3960 8 หลายเดือนก่อน

    Was is live? I missed it?

  • @aneellakhani6535
    @aneellakhani6535 10 หลายเดือนก่อน

    So beautiful

  • @iamleonardjunior1877
    @iamleonardjunior1877 7 หลายเดือนก่อน

    Code mother,can you create a video on hacking

  • @JSL180
    @JSL180 7 หลายเดือนก่อน

    `libGL error: MESA-LOADER` solved with `conda install -c conda-forge libstdcxx-ng`

  • @TheGroundskeeper
    @TheGroundskeeper 9 หลายเดือนก่อน

    I love you.

  • @1PartiZzan
    @1PartiZzan 10 หลายเดือนก่อน +1

    Ээээййй 🙀

  • @baseddepartment1306
    @baseddepartment1306 10 หลายเดือนก่อน

    If you are not testing in production you are overthinking it

  • @mohamedrebbouh
    @mohamedrebbouh 8 หลายเดือนก่อน

    Focus on video content ❌
    Focuse on The pitch of your voice ✅
    🤣🤣

  • @MegaZigzag69
    @MegaZigzag69 10 หลายเดือนก่อน +1

    No, you too beautiful ))

  • @RobloxBedwarsPlayer01
    @RobloxBedwarsPlayer01 7 หลายเดือนก่อน

    Why are you too beautiful ? 😁

  • @Rammen
    @Rammen 9 หลายเดือนก่อน

    Давай поженимся!?😊

  • @user-tu3um6pk2j
    @user-tu3um6pk2j 9 หลายเดือนก่อน

    If you don't make mistakes, then you are solving too simple problems. And this is your biggest mistake.

  • @mibrahim4245
    @mibrahim4245 10 หลายเดือนก่อน +1

    Thank you M

  • @othmanmohammedaziz
    @othmanmohammedaziz 8 หลายเดือนก่อน

    hello teacher can i text you on Email ?