Join The No-Test-Writing Movement 🤯
Вставка
- Опубліковано 8 чер 2024
- No more writing unit tests. Seriously. Learn how to revolutionise your code and streamline your workflow with ChatGPT's for unit testing.
With a focus on test automation, this video is a must-watch for software developers looking to enhance their skills and take their code to the next level.
Don't miss out on this game-changing opportunity and learn how to generate tests and speedup your development workflow.
#softwaretesting #chatgpt #java
Learn more about Full Stack Professional course here - amigoscode.com/courses/full-s...
Don't Forget to
===========================================
💯 Subscribe to Amigoscode - bit.ly/2HpF5V8
💯 Courses Available for free here - amigoscode.com/courses
💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
⭐ Table Of Contents ⭐
===========================================
00:00 - Intro
00:44 - Tests with ChatGPT
09:59 - Outro
🙊 Here are the goods for all my videos video 🙊
► Recommended Books
===========================================
- Clean Code - amzn.to/2UGDPlX
- HTTP: The Definitive Guide - amzn.to/2JDVi8s
- Clean Architecture - amzn.to/2xOBNXW
► Computer and Monitor
===========================================
- New Apple MacBook Pro - amzn.to/3464Mmn
- Dell 27 INCH Ultrasharp U2719D Monitor - amzn.to/2xM3nW1
- Double Arm Stand Desk Mount - amzn.to/3aYKKfs
- USB C Hub Multiport Adapter - amzn.to/2Jz7NlL
► Camera Gear
=============================================
- Sony ILCE7M3B Full Frame Mirrorless Camera - amzn.to/346QIJn
- Sigma 16 mm F1.4 DC DN - amzn.to/2wbic3Q
- Sigma 33B965 30 mm F1.4 DC DC - amzn.to/39G37Fd
► IDE & Tools I use for coding 💻 🎒
===========================================
- ITerm
- VsCode
- GoLand
- IntelliJ Ultimate
- Sublime
P.S
===========================================
💯 Don't forget to subscribe | bit.ly/2HpF5V8
💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
💯 Follow me on Instagram | bit.ly/2TSkA9w
❤️ Thanks for watching - Наука та технологія
LOL I use GPT all the time and I had never even thought of GPT being able to write my tests. Dude, this is too good to be true!
Just write good and testable code. That's also something to consider when trying to do that.
Be careful, remember that ChatGPT doesn't check if outputs are correct
Also, there might be some corner cases that chat gpt doesn't know about.
ChatGPT itself mentioning that output may vary as I don't have access blah blah blah... Imagine if it gets access 💀
For now
Chatgpt write a test that tests the test that tests your output
You do really amazing job. Following you for couple of years now and you've really helped me with my career.
It would be a great thing if you'd create some tutorial for Integration testing in Spring. I think a lot of people don't understand it and it would be great if you would explain it.
Keep up the good work :D
Just don’t follow that particular advice he gave in this video:)
Do know that once you send your code to ChatGPT, *someone* has access to it, so you have effectively handed your code over to The Borg. So make sure that you are OK with that.
I'm learning Terraform at the moment and GPT gave me so many wrong answers, unfortunately. I hope it'll get better though. I think if you already have some knowledge, you can ask better and more specific questions, as well as check all its answer for correctness.
Don't outsource your knowledge and your natural AI. :)
You are doing a great job. It is really helpful for beginners like me. Greetings from India ❤
Maasha Allah, that's so so superb. Nelson, you really are a genius because this idea didn't even cross my mind Wollah, I don't even know what to say actually, may Allah increase you in knowledge and wisdom. Ameen Ya Rabb
What about TDD approach? Doesn't this defeat the whole purpose of writing test cases if Test is written after the class to be tested is created?
Same concern here.
I think you argue that this is a good way to get tests and test coverage for existing (legacy) code, which facilitates refactoring. But otherwise it is what junior devs would do: test the implementation.
@@malteplath No, the goal is to have tests to verify nothing breaks when you change code in the future; executable comments!
TDD doesn't always work in practice. I don't always know how I'm going to architect some code before I write it. I may need to experiment a bit. Writing tests first can be cumbersome.
@@NathanHedglin Good to see that you agree with me on the usefulness of tests for refactoring.
As for your comment about TDD, I am not sure about the extent of your statement. There's nothing wrong with experimenting, prototyping. The advantage I see in TDD is that it forces you to think about the interfaces, about how you want the rest of the world (also other parts of your system) to interact with what you are architecting.
It does not prevent you from coding (or configuring) some infrastructure that you need before you can write meaningful tests. (After all, the tests will show if that infrastructure is up to the task. - To some degree, at least.)
@@NathanHedglinwhaaaaat? Is that really the goal for having test? I just hope you’re not working on anything critical 😂😂
It looks like future have came. And you was right in one of you video - we all should understand the subject - java, or other programming language. As a tool this is awesome, as a AI developer - not.
Thank you for sharing
Wow! Game changer.
wow thats wild ! nice tip
Will be great to see how to add and test payment feature in spring boot project
thx a lot ✌
Thanks for the video! Is it really Intelliji or it's Visual-studio-code as code-redactor?
Chat GPT is amazing tool, I used to create some scripts, when Im not in the mood, or create some code, some code I used sometimes but I dont memorized all parameters, but when I saw I know what todo, he simplify this, is good base of infomartion to check some code.
Awesome!
Nice video!
There are plugins for that also. Diffblue and machinet for example. Of course you must pay something after a free period
Which software you use for java compiler
Nice
gpt is a game changer
Your fullstack course looks pretty neat, but at the cost of twice the minimun wage where i live it is pretty expensive, not your fault I live in the thrid world tho, keep the good content
I love your channel and this video. While I like this direction, playing with ChatGPT the past few months, I tend to like the other direction better as I find ChatGPT to tend to be more accurate => write tests and ask ChatGPT to write code that passes these tests. Still not 100 (needs review), but it has become my preference.
That is so dumb, omg 🤯
There’s going to be such a mess in codebases across the globe to clean in a few years, lovely
What do you think about the privacy aspect of sharing source code with chat gpt? I’m personally concerned about IP being leaked/stolen
Even ChatGPT itself warns against copy pasting the Company code.
Yep, exactly.
anyway for learning it's awesome
@@caffeinejavacode1475not really
Test cases should always be written around the expected behavior of the requirement (including edge cases); instead of looking at the code first, and then writing asserts which would then, obviously, pass.
Using ChatGPT to help with writing test cases is like someone asking "Honey, do I look fat?" which will obviously result in an answer: "You look as thin as paper, my love!" - and this is exactly what ChatGPT will cheat us with, by using its own AI generated asserts which will pass and make everyone happy with good code coverage, but will, in fact be pointless, since it will not be able to detect any misses in the actual expectations of the business requirements.
TL;DR: Super interesting video. But, right now, do not trust an AI writing your test cases. The AI will fail you; and yes, you'll still have your job if you do write the test cases by yourself! 🙂
Good work 🫡
could you teach clean architecture using java?
Assalamu Alaikum, Brother. Please make some vlogs. They are truly inspirational.
The first think I thought after I used chatGPT, when will IntelliJ integrate this 😅
ChatGPT is heaven
This will be anti pattern for TDD as one has to implement the logic before generating Tests wit ChatGPT
TDD is like a cult. Few follow it since it’s not really practical. But it doesn’t change the fact that generating your tests like that is one of the dumbest things one can do.
I think Amigoscode noticed that too many people do not write test so he made this video lol
What intelij theme are you using in this video? @Amigoscode
it's a default one
What can be happened in a case of missing some tetsts? Who will be fined or fired? :)
Wish there is a Chat GPT plugin integrated in the IDE.
There is! For Visual Studio Code
Tabnine has implemented writing tests, and they’ve been bragging about it for some time
Hello Nelson. Which theme is this
Enable the new UI
Press Ctrl+Alt+S to open the IDE settings and select Appearance and Behaviour | New UI.
Select the Enable new UI checkbox and apply the changes. Restart the IDE.
+ Nyan Progress Bar plugin
GPT writes my code and tests lol.
This is so much more scary than having chatgpt write code 😆
what about micronaut
To anyone who does that : please stop. Tests are supposed to test if the result matches the design, not if the result matches the code. Which it obviously does.
please make real time spring boot api
Hello @Amigoscode. I have the idea how to get more smash buttons. On the 3rd minute of video clip when you said about likes I made it by using shortcut 'F' to minimize screen and press ''like' then again press 'F' to full screen. It tooks less steps rather than moving a finger on the touchpad or a mouse. I just want to help this amazing channel for other programmers. Just try to say it in next videos and let's see what will be next.
🤝
I liitle bit scare that I won't find a job because of GPT rival
😂 You're fine. Clients cannot clearly define what they want to make ChatGPT to work
I wonder when I`ll hear that there is no place for java developers on the market?
I don't like to use gpt, I prefer to write code my own.
Aleyküm selam:)
I'm just shocked.😨
can you please in the future make c++ tutorials from beginners to advanced please?
He is mainly a Java developer
About ChatGPT writing the tests for the code: I disagree entirely with this approach of not writing tests. Instead, I prefer to elaborate on them and ask ChatGPT to write the solution. This is even more directed to "elaborating the question (or the prompt, as you wish)".
I think it's very nice job from the ChatGPT, but it wrote a test about your code. If your code is wrong, the test will still good, because ChatGPT adapts the test to your code. I think the good way to write test with Chatgpt, only input parameters and logical conditions should be given to it. But you must not give him the program code.
Theme name ?
Enable the new UI
Press Ctrl+Alt+S to open the IDE settings and select Appearance and Behaviour | New UI.
Select the Enable new UI checkbox and apply the changes. Restart the IDE.
+ Nyan Progress Bar plugin
This is the worst piece of advice ever.
ChatGPT does not learn from what you give it, and does not "think". It is a natural language AI, it analyses what words and sentence is more likely to come next given a massive load of pre-existing data.
It is never going to be able to analyse your code the way a programmer think and write code that actually result from a true comprehension of what it does. And it is never going to execute the tests it provides to check their validity, but will always produce them as if they were pure truth.
Saying that it can write the test for you is just opening the door to massive mistakes when actual programmers will begin to stop checking that every line produced by this AI is actually correct...
As a professional that is trusted by a large community of people, this is totally irresponsible and dangerous to give this example as if it was actually a good practice.
Interesting. It seems a good idea to let ChatGPT write the unit test crap.
It seems that you’re mediocre engineer if you’re not seeing what’s wrong with that approach.
@@bdkamil95 come on dude. unit test is simply crap so what's wrong letting ChatGPT do that. Ideally unit test should cover every possible scenario and thus eliminate bugs. But in real world most unit test code only uses one or two sets of data and passing the test only means the code passes the most basic check. Most bugs are found in integration testing.
@@closetothee3785 in real world you’re a terrible engineer, if at all. No wonder why most code bases are such a sewage
@@bdkamil95 Well it's ok if saying those words makes you happy 😄
@@closetothee3785 listen, if you cannot see what’s wrong with you approach, then what are we talking about? You’re writing pointless and crappy code and then calling it reality. I mean, come on… There’s plenty mediocre devs with similar thinking so you can kinda feel ok. As long as you want to be mediocre ofc
To be honest, it’s such a misleading and harmful content…. Especially taking into consideration who’s your main audience - juniors or students.
You just showed them how to generate poor quality code that shines green when ran against their junior/student quality code with bugs and logical mistakes.
So many times you can find your own business/technical mistakes when writing test code - that’s gone with your approach.
There’ll be so much more poor quality code in codebases across the industry in a few years…
There’s already a regression when it comes to efficiency and hardware utilization due to picking “easy” prototyping tech stacks. With that approach it will be even worse.
And btw amigoscode what’s most disappointing is that you simply do not understand how it works. It doesn’t learn form your code in a way you’re presenting it to your audience. It is super misleading.
Terrible advices in that video.
assertEquals("Amigoscode","crème de la crème");