Jump to content

Automated tests for code


Recommended Posts

Posted
Just now, usauae said:

meeru andaru 8 hrs work ante asalu distract avvakunda chestara bro ?

manaki kavalsina data ki query rasukovali, model create cheyyali, map cheyyali(of course automapper yele) controller, service layer, repository layer classes create cheyyali. possible null and other checks cheyyali

not complaining but I want to enjoy coding and don't feel like a burden. Adi yela alavatu chesukovala ani asking thats all

starting lo alane anipisthadhi... alvatu ayithe.. ok endpoint ki 2-3 days lo katam cheyachu.. depends on complexity  also

Posted
37 minutes ago, dasari4kntr said:

For Second Question: YES..initially that is painful..but once you used to it...its the best approach

For Third Question and Fourth Question: coverage means, your code is covered with unit tests or not..? if your code is covered with unit tests obviously your code is much better..

unit tests secretly makes you learn SOLID principles... if you want to implement Unit test you have to learn dependency injection..etc so obviously your code will be loosely coupled.

 

For First question:

this is the git flow model, most of the organizations follow this model..with minimal changes...

at feature level, you need to run build and unit tests

at develop level, you need to run the build, tests, coverage, integration..etc

at release level, you need to run build, tests, coverage, integration, vulnerability scans, security code scans..etc

git-model@2x.png

for some reason i thought all developers hate unit testing. but mee andaru cheppina danibatti nenu chala yedagali ani telisindi.

Btw maa company lo inta complex branching strategy ledu bro just master and the branch you want to push your feature.

 

Posted
6 minutes ago, usauae said:

meeru andaru 8 hrs work ante asalu distract avvakunda chestara bro ?

manaki kavalsina data ki query rasukovali, model create cheyyali, map cheyyali(of course automapper yele) controller, service layer, repository layer classes create cheyyali. possible null and other checks cheyyali

not complaining but I want to enjoy coding and don't feel like a burden. Adi yela alavatu chesukovala ani asking thats all

Antha ledu e madya la only puncture work but when we developed initially yes already tables ki jpa mapping ubtadi bro , api service layer lo business logic it all depends on complexity of api ipdu oka table to resd chesi supporting products list iyamanadu entha sepatlo istav fast, but for example we integrate with various payment processors vatiki a spec ardam chesukoavdaniki and to map it out fields ke time padthundi tension padaku make sure the done definition  of your task is is only when you write unitetss and integration tests apudu simple aitadi 

  • Thanks 1
Posted
6 minutes ago, usauae said:

for some reason i thought all developers hate unit testing. but mee andaru cheppina danibatti nenu chala yedagali ani telisindi.

Btw maa company lo inta complex branching strategy ledu bro just master and the branch you want to push your feature.

 

 

Unti test will help to avoid issues with code when multiple developers are working on diff features on same code base. They have many more advantages. 

Most now a days also follow TDD, meaning you write the unit case first while developing code.

Minimum ..master- develop- personal branch better.

 

starting lo alane complex ga untadhi.. 6 months lo you will get used to it.. dont worry keep working

  • Like 1
Posted
22 minutes ago, usauae said:

meeru andaru 8 hrs work ante asalu distract avvakunda chestara bro ?

 

morning nudni ippadi varaku ee thread lo reply ichnaa vallani , list lo nundi teeseyi 

Posted
13 minutes ago, ramudu said:

morning nudni ippadi varaku ee thread lo reply ichnaa vallani , list lo nundi teeseyi 

Haha may be u r practicing purposeful procrastination 

Posted
1 hour ago, usauae said:

for some reason i thought all developers hate unit testing. but mee andaru cheppina danibatti nenu chala yedagali ani telisindi.

Btw maa company lo inta complex branching strategy ledu bro just master and the branch you want to push your feature.

 

some developers...if they want to write any method..they first start with unit test...

there is lot of advancement in testing libraries...now a days you dont need to create a mock data also...lot of auto fixtures libraries are there to provide plenty of variety inputs to test your method...

Posted
2 hours ago, usauae said:

calling @dasari4kntr  @ramudu and any other tech enthusiasts. 
I have an api endpoint that checks for a condition and does some logic. 
so we had a small block of code that was not working as intended. 

Maa manager looked at the code and asked why did we not have unit tests for that condition. 
And why are we checking for nulls in multiple places. Asking us to move that to a method. (Only 2 places lo vundi)

So my question is 

1. do you write integration tests that run every time you commit the code?

2. do you write unit tests that cover each and every possibility ?

3. Does code coverage really help with producing better code ?

4. Would you move code to its own method even if it is repeated once ?

 

Yemi aina ante yedo oka book refer chesi chadavandi ani sava dobbutundi maa manager.

 

 

2 hours ago, dasari4kntr said:

For Second Question: YES..initially that is painful..but once you used to it...its the best approach

For Third Question and Fourth Question: coverage means, your code is covered with unit tests or not..? if your code is covered with unit tests obviously your code is much better..

unit tests secretly makes you learn SOLID principles... if you want to implement Unit test you have to learn dependency injection..etc so obviously your code will be loosely coupled.

 

For First question:

this is the git flow model, most of the organizations follow this model..with minimal changes...

at feature level, you need to run build and unit tests

at develop level, you need to run the build, tests, coverage, integration..etc

at release level, you need to run build, tests, coverage, integration, vulnerability scans, security code scans..etc

git-model@2x.png

Chatgpt chaana gattiga using anukunta ga vuncles.😂

Posted
1 minute ago, Charger said:

 

Chatgpt chaana gattiga using anukunta ga vuncles.😂

sontha comment bro...not chatgpt response..

Posted
Just now, dasari4kntr said:

sontha comment bro...not chatgpt response..

sorry bro, aa format chusi misunderstood 

Posted
22 minutes ago, Charger said:

 

Chatgpt chaana gattiga using anukunta ga vuncles.😂

Chatgpt response ni kuda decode chesthunav antee , you definitely openai mogudi laa unnav bro , great

Posted
1 hour ago, ramudu said:

Chatgpt response ni kuda decode chesthunav antee , you definitely openai mogudi laa unnav bro , great

enti-bro-antha-maata-annav.gif

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...