Questions tagged [unit-tests]

Unit testing is a method by which individual units of source code are tested to determine if they are fit for use. A unit is the smallest testable part of an application.

Filter by
Sorted by
Tagged with
31 votes
4 answers
2k views

Developing Unit Tests While Refactoring Legacy Code?

I have a big code library that I need to refactor in order for it to fit more nicely together (one big problem is there aren't clear enough boundaries between each component). Since there will be ...
user avatar
  • 623
10 votes
3 answers
3k views

What is really tested in an integration test?

what is really the difference between a component/unit test and an integration test? Suppose you do very fine unit testing with stubs and drivers and test each component as far as you can with unit ...
user avatar
  • 101
11 votes
2 answers
2k views

Implementing the Test Pyramid as QA

Recently I have begun building out Unit Testing for my dev team during down time in an attempt to implement the Test Pyramid. My Dev Managers seem rather excited about it and on-board with the idea. ...
user avatar
  • 3,212
20 votes
7 answers
2k views

In agile (Scrum) practices, where do I start with making QA (testing) more efficient if the team is transitioning from waterfall to agile?

My team has recently transitioned from the traditional waterfall method to practising Scrum. Being the QA lead, really the only tester on a small team, how can I get the process more aligned with ...
user avatar
  • 535
24 votes
3 answers
3k views

What's the recommended practice for separating unit tests from integration tests for automated testing?

On a project I've been working on, we've been steadily increasing the code coverage through tests. Some of these tests were done as integration tests and some as unit tests. The integration tests can ...
user avatar
15 votes
4 answers
3k views

Test strategy to bring automated tests from UI to lower(API/Unit) layers?

Background/Problem Statement: Recently I came across a project team, which is having thousands of UI automated tests covering all kind of manual tests including positive, negative etc., and obviously ...
user avatar
9 votes
6 answers
940 views

Database code unit testing tips

I'm working on developing a big 3-tier application. Database has a lot of code (stored procedures, functions, triggers, etc). I'm looking for a valid approaches how to implement unit testing for the ...
user avatar
  • 193
11 votes
6 answers
775 views

How can testers motivate developers to write unit tests?

Unit-testing, oftentimes, is thought of as a burden and not exciting at all - more code to write, configure and maintain which requires time which results into delays in delivering features or fixes. ...
user avatar
  • 11.4k
9 votes
3 answers
901 views

Exercises on software testing

I've been learning how to program in Python. I've passed the MIT course "Introduction to computer science, using Python" on edx.org. I can write small programs in Python. I want to become a tester. I'...
user avatar
  • 99
2 votes
1 answer
3k views

What can I unit test in a mobile app?

Some background first: we're developing custom mobile apps, most of them tailor made for B2E scenarios. At the moment, we're only testing manually. I know some people consider this a cardinal sin, but ...
user avatar
8 votes
3 answers
21k views

What are the test cases or test scenarios for palindrome?

In an interview, the interviewer asked me to write test cases or test scenarios to check if the input/string is a palindrome. I told them one positive test case and another negative test cases. But ...
user avatar
7 votes
2 answers
165 views

Are there some well known pitfalls to avoid when starting with unit testing on a "legacy" web application?

I am participating on the development of the web application which has several years of history behind it and there never was enough value and effort put on refactoring, so considerable part of the ...
user avatar