Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,710 members, 7,813,347 topics. Date: Tuesday, 30 April 2024 at 11:07 AM

Gain Confidence In Your Code Through Testing - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Gain Confidence In Your Code Through Testing (1031 Views)

Let Me Debug Your Code For You / Pls Help.. I'm Losing Confidence In My Abilities / Share Your Code Snippet (2) (3) (4)

(1) (Reply) (Go Down)

Gain Confidence In Your Code Through Testing by harryobas: 4:14pm On Feb 08, 2019
The longer you program, the greater the quantity and variety of bugs you have seen. With more experience as a programmer, you realize that in systems as complex as software applications, bugs are inevitable. For the inexperienced developer/programmer code is prima facie flawless. But experienced programmers know there are flaws, and only worry how many.

The situation may seem dire, but we are not without hope. We have ways to mitigate, minimize, and even prevent bugs. Among these techniques are documentation, proper software design, and software testing. While all of these options are important, I think the most neglected among new programmers is software testing. To effectively test software in my experience and opinion, test cases will have to provisioned at 3 levels namely:

1. Software requirements level (i.e use cases or user stories) - Test cases at this level is focused on acceptance tests which test mainly functional requirements but depending on the application domain it is also possible have test cases for contextual requirements or ilities such as performance, availability and security to name but a few.

2. Software architecture level - Test cases at this level is focused on integration tests which test the interaction between a software's internal components.

3. Software component-level design - Test cases at this level is focused on unit tests which test a single component of your software this could either be a class or function depending on your adopted programming paradigm.

All of these types of test cases are important, but component-level design test cases are of particular interest to programmers and developers are like as they are inherently developer-centric, focusing on unit tests which test a single components functionality independent of external dependencies.

So why should you write unit tests as a developer? - You should write unit tests, because they will give you the confidence to build new features, fix bugs, and release new versions of your software. Write and execute thorough tests, and you can ship with confidence.
Re: Gain Confidence In Your Code Through Testing by boyfem: 12:31pm On Feb 10, 2019
Nice write up.
What of the case where you are dealing with firmware. How do you go about this.
Re: Gain Confidence In Your Code Through Testing by vezycash(m): 3:43pm On Feb 10, 2019
One skill Nigerian computer science schools don't teach is how to use a debugger.

Many pros rate debugging as the number one skill required of programmers - far above writing tests.

One debugger indispensable Javascript programmers is the chrome inspector and the equivalent for Firefox and safari.
Re: Gain Confidence In Your Code Through Testing by harryobas: 6:53am On Feb 11, 2019
vezycash:
One skill Nigerian computer science schools don't teach is how to use a debugger.

Many pros rate debugging as the number one skill required of programmers - far above writing tests.

One debugger indispensable Javascript programmers is the chrome inspector and the equivalent for Firefox and safari.

Dude you seem to miss the different objectives/goals of testing and debugging. They both have complimentary but different purpose.

Testing is the process of finding bugs or errors in a software product. Debugging on the other hand, is the process of fixing bugs found during testing
Re: Gain Confidence In Your Code Through Testing by vezycash(m): 9:33am On Feb 11, 2019
harryobas:


Dude you seem to miss the different objectives/goals of testing and debugging. They both have complimentary but different purpose.

Testing is the process of finding bugs or errors in a software product. Debugging on the other hand, is the process of fixing bugs found during testing


This is the definition of software testing from Google:

Software testing is a process of executing a program or application with the intent of finding the software bugs. It can also be stated as the process of validating and verifying that a software program or application or product: Meets the business and technical requirements that guided it's design and development.

http://tryqa.com/what-is-software-testing/


In other words,

Software testing involves:
1. Debugging
2. Unit tests
3. Requirements tests
4. Unit tests
5. UI tests
6. Stress tests

Debugging is the subset of software testing involved in finding and fixing bugs.

Schools teach the broader requirements, unit & sometimes integration test parts because it's easy to explain.

However, the debugging part of software testing is glossed over because it's practical in nature.

Hope we cool. No disrespect intended. We life long learners.
Re: Gain Confidence In Your Code Through Testing by harryobas: 10:35am On Feb 11, 2019
vezycash:


This is the definition of software testing from Google:

Software testing is a process of executing a program or application with the intent of finding the software bugs. It can also be stated as the process of validating and verifying that a software program or application or product: Meets the business and technical requirements that guided it's design and development.

http://tryqa.com/what-is-software-testing/


In other words,

Software testing involves:
1. Debugging
2. Unit tests
3. Requirements tests
4. Unit tests
5. UI tests
6. Stress tests

Debugging is the subset of software testing involved in finding and fixing bugs.

Schools teach the broader requirements, unit & sometimes integration test parts because it's easy to explain.

However, the debugging part of software testing is glossed over because it's practical in nature.

Hope we cool. No disrespect intended. We life long learners.

From the Google definition of testing you have presented, you can see clearly that testing and debugging are completely different activities and debugging is not a subset of testing as you claim. Testing is focused on finding bugs and does not attempt to fix them. Debugging is focused on fixing bugs. But bugs have to be discovered before they can be fixed which is the goal testing(i.e to find bugs)
Re: Gain Confidence In Your Code Through Testing by vezycash(m): 3:30pm On Feb 11, 2019
harryobas:


From the Google definition of testing you have presented, you can see clearly that testing and debugging are completely different activities and debugging is not a subset of testing as you claim. Testing is focused on finding bugs and does not attempt to fix them. Debugging is focused on fixing bugs. But bugs have to be discovered before they can be fixed which is the goal testing(i.e to find bugs)

You are right.

This article breaks them down fully

http://www.professionalqa.com/testing-vs-debugging
Re: Gain Confidence In Your Code Through Testing by asalimpo(m): 6:29pm On Feb 11, 2019
@vezycash
One reason schools dont teach debugging mayb because there isnt any theoretical backing behind it.
It's hands on and dirty.
Just like mathematicians only display their polished works (proofs) without hints to the long ardous road it took to get there.

1 Like

Re: Gain Confidence In Your Code Through Testing by asalimpo(m): 6:31pm On Feb 11, 2019
@vezycash
One reason schools dont teach debugging mayb because there isnt any theoretical backing behind it.
It's hands on and dirty.
Just like mathematicians only display their polished works (proofs) without hints to the long ardous road it took to get there.

Then most lecturers arent professional software engineers.

1 Like

(1) (Reply)

Building Mobile Apps On Ios? Reasons To Reassert Your Choice! / Is Kivy Good For Creating Android Apps / Professional Web Designing Training On Whatsapp

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 22
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.