Tagged Questions

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.

learn more… | top users | synonyms

0
votes
2answers
29 views

Asking for help with this Therac 25 bugged code. I don't understand the explanation

Therac 25 is a radiation therapy machine that lead to 3 deaths and 3 injuries in 1980s. That's the worst accidents in history which are caused by software bugs. In 1993, Leveson and Turner did a ...
2
votes
3answers
79 views

Testability analysis for PHP

Is there any tool that reports on the testability of a PHP codebase? I'm familiarised with what makes the code unit-testable, but I need a way to visualize it so I can easily find which classes can ...
1
vote
5answers
101 views

Can testers benefit from knowing the status of unit tests?

If a unit test passes, what you can infer is - barred exceptions - that the unit tested works as intended. Nothing can be said about all other components involved since they might be (and usually are) ...
0
votes
1answer
18 views

Android JUnit With Varying Network Conditions

I have written a suite of tests for our company's Android app using Android JUnit and Robotium. I have written a Utility that can enable and disable networking for a device. My Question is: "Is ...
0
votes
5answers
137 views

New to testing - need direction

I just found this site, and I have a question for everyone who can help me. My new passion for IT made me wish to learn more, and I wish to start with Testing. I've learned HTML5 and CSS3, but now I'm ...
0
votes
2answers
54 views

Are there any unit test frameworks for Java that have a checkbox style UI?

Are there any unit test frameworks for Java that have a checkbox style UI? I am really looking for an answer that is a web UI sort of thing (such as a jenkins plugin) but a satisfactory answer would ...
1
vote
1answer
161 views

Is there any framework for UI automation testing for Unity3D?

Does anyone know any framework that is compatible/integrated with Unity3D? I'm interested in Unit, Integrated and UI testing.
0
votes
1answer
37 views

Testing strategies for testing a Scheduler

We have developed an in-house Scheduler which is based on Rate-monotonic scheduling. We have 6 tasks (5 actual tasks and 1 idle task). Our scheduler works on 1msec timer interrupt. Before sending it ...
0
votes
2answers
39 views

How should I be unit testing the search process of a web app

A lot of the examples for unit testing that I see involve testing that numbers add up. For example, Derek Greer demonstrates unit testing a calculator app, making sure that the equals function does ...
11
votes
5answers
1k views

Should I unit test for null values even if it can never happen?

Lets say I have an event listener that is called whenever a person has changed their location. Here's some Java code. public class LocationManager() { //.. .. ..// public void ...
0
votes
1answer
60 views

Decoupling Unit Tests

I'm trying to learn how to write unit tests the 'proper' way and only test a specific component. (Using http://blog.stevensanderson.com/2009/08/24/writing-great-unit-tests-best-and-worst-practises/ ...
1
vote
2answers
65 views

Run impacted tests right after code change

I have partial memory recollection of product for .NET and Visual Studio that runs impacted unit tests right after you change one line or something like that. It has some smart code impact detection ...
0
votes
1answer
78 views

Mutation-testing generation [closed]

I' giving a presentation about this paper: https://www.st.cs.uni-saarland.de/publications/files/fraser-tse-2011.pdf Unfortunately I don't understand 2 things: On page 9 table 1: Where are these ...
0
votes
1answer
90 views

Android / Java Unit-Testing Clarification

While looking up for unit testing for Android applications, I came across a lot of voices over how it is difficult to test-unit an Android app. For example: Dependency issue - why is this a problem ...
0
votes
3answers
1k views

How can I do data parameterization in Selenium Web Driver?

I want my test case to run once and test n number of inputs at various positions. Suppose If I want to check a login screen for different members like manager,user,admin,e.t.c then instead of running ...
1
vote
2answers
71 views

Unit test for method block that will occur daily

I have a method Fetch, GetExchangeRate and method FetchOnDemand. FetchOnDemand checkds if Fetch is not called during one day it calls it. GetExchangeRate calls FetchOnDemand first then does its ...
0
votes
1answer
141 views

CSS/XPATH selector management using python's dictionary

I have a lot of functional tests in Python. As expected , they use a wide variety of css/xpath selectors . I think I read somewhere that a practice is to have a dictionary where each selector would ...
0
votes
1answer
115 views

question if this job should be a red flag or not [closed]

I have only talked to the recruiter so far and he seems legit, but recruiters always try to make a job sound fluffy. I literally only applied because im going to be on unemployment and I know I have ...
0
votes
0answers
192 views

Cucumber, Rspec, Test-Unit & mini-test Pro Con for interfacing with rake and Selenium Webdriver

I'm in the market for a new test framework. I currently test-unit but I seems like there is some incompatibility between Test-unit , Selenium-webdriver, and modern versions of Firefox. I have had to ...
1
vote
1answer
561 views

How to use databases within the python unittest framework?

I have a bunch of unittests written in python in which messages (text) of any kind is used. Instead of 'hardcoding' the text examples used for the tests I would like to use a database of some kind ...
10
votes
3answers
1k views

Writing test cases before implementation?

So currently at my company it is common practice to write test case high level steps before implementation. Myself and others find this to be a somewhat wasted effort. I often end up blowing away much ...
3
votes
2answers
490 views

Running automated tests for Unity apps on iOS/Android devices?

I want to run automated tests for a game that I am developing with Unity. It runs on iOS and Android devices. As a first step we would like to Launch the game on device type X If the game loaded on ...
4
votes
2answers
166 views

Testing programs that handle huge datasets

I'm writing a script that parses many thousands of lines from a server log and collates the data. I'm wondering how to go about creating unit-tests for such a program, to make sure it gathers the data ...
1
vote
1answer
361 views

Unit Testing: Windows Forms using MS Visual Studio 2008

I've created unit tests of my WinForms using MS Visual Studio 2008. None of my tests have been approved. All of them (0/42 tests) resulted into some kind of failure described as follows:- ...
1
vote
4answers
201 views

Is unit and component testing sufficient?

If you can test every line of [your product's] code via unit tests, wouldn't unit testing alone (theoretically) be sufficient? Are there other "necessary" benchmarks of proper test coverage other ...
3
votes
4answers
240 views

How would I unit test these functions?

I have the following functions : Get(ds,filename) - gets a file from a data source ds. Put(ds,filename) - puts a file into a data source ds. List(ds) - lists all files in data source ds. ...
0
votes
2answers
141 views

How to automatically break Unit Tests when their related Requirements change (before any code change)

The shop I work for has recently switched to Agile/Scrum software development. We've started logging User Stories, and defining their scope with Acceptance Criteria. So, we have Features defined ...
2
votes
1answer
195 views

I should follow ISO 12207 but how should I verify integration/code without testing?

I am forced to follow ISO 12207 for systematic approach. I have been reading a lot here and found similar questions, yet not the same one and definitely not any suitable answer. According to this ...
2
votes
2answers
162 views

Dynamic whitebox testing and coverage metrics for Java systems?

What coverage measures/metrics are useful for unit testing and for integration testing of Java or other object-oriented systems? Context: We would like to establish a better test process. Our ...
4
votes
0answers
262 views

Jenkins stops getting my unit test output from xcodebuild

I've got Jenkins set up to build my application test target and execute tests in the iOS simulator like this answer says. When I execute the build in Jenkins, the iOS simulator launches and runs all ...
1
vote
1answer
132 views

Unittesting GUI. MVC model. When to move data to controller

I've been reading different opinions about how to unittest GUI in Java and it is clear that the best approach is to design the code in a MVC model, in order to be able to test everything. Anyway I ...
5
votes
1answer
162 views

How do I reasonably unit test calendrical calculations?

I've written some code that performs some action, depending on the day of the year and the year. There are an infinite number of years, hence an infinite number of days? What's a good way to unit ...
2
votes
1answer
67 views

Enforcement of quality as a runtime requirement

I come from a background that strongly emphasizes automated testing baked into the build process. You commit, the code is checked out by the build system, compiled, and tests run against it. If it ...
3
votes
1answer
294 views

What is tested by IcuTest?

In the current "Automated Software Testing" magazine there is a short article about IcuTest. It is written that with "Test Generator" you can automatically create GUI unit tests: ICUTest is a ...
4
votes
4answers
271 views

Where to focus testing? On integration level or unit level?

Consider a modern web application that serves JSON through a REST API to a rich Javascript-based application with one or more single-page apps within it. Our own application is written using Angular ...
3
votes
1answer
117 views

Are there common techniques for testing the conformance of an implementation to a general contract?

Say you have defined some abstract interface and you specify a general contract for that interface to which all implementations must adhere. Are there common techniques that can facilitate testing the ...
1
vote
1answer
137 views

Tools similar to Google Test for C++ unit testing?

Are there any tools similar to GoogleTest for the purpose of functional testing in C++. I plan to do them as part of Unit Testing and would like to know of other options available so that I can make ...
4
votes
3answers
2k views

What are the test cases or test scenarios for palindrome

In the interview, the employer asked me to write test cases or test scenarios to check the Palindrome of the word. I said one with positive test case and another with negative test cases. But employer ...
2
votes
2answers
758 views

Why run unit tests on mobile devices?

I know unit test suites exist for Android, Blackberry, Windows Phone, etc. I have some experience in writing unit tests in Java using JUnit, and C++ using CppUnit. Why would one want to write a ...
4
votes
1answer
1k views

xcodebuild does not run any unit tests when launched from console

My first question here so please bear with me. It may be off topic, if so - close the question. I have setup Jenkins with git and Xcode plugins so that I would be able to build an iOS project on CI ...
2
votes
4answers
690 views

Good resource on how to write dot net unit test cases?

I am looking for good resources on how to write good unit test cases in C#/Dot Net. Books, resources on the net or simply good advises. In particular the unit cases should give good code coverage and ...
2
votes
2answers
1k views

NUnit: Global error method/event for handling exceptions

I'm looking for a way to catch exceptions globally in my NUnit project class library. So if one of my unit tests throws an exception, I can catch it in one spot. I don't want to surround each of my ...
7
votes
4answers
1k 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 ...
6
votes
3answers
572 views

How to avoid redundant tests

We are building an application using a completely test-driven approach. As developers, we are very familiar with unit tests but haven't been exposed to integrated / functional / acceptance tests. ...
3
votes
2answers
258 views

Is NUnit a viable choice for a starting long term project these days?

I currently participate on the decision to pick a unit testing framework for a bigger long term project. NUnit, being an ubiquitous unit testing tool, would make it a natural choice for me, but not so ...
4
votes
1answer
75 views

Are there some well known nasty pitfalls to try to avoid at all costs when starting with unit testing on a partly 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 ...
4
votes
2answers
109 views

Is this a good simplification of fake object types?

With every unit testing text I get my hands on comes a little different terminology and more or less different definitions of various fake object types. I find that a lot of this differentiation is ...
0
votes
1answer
162 views

How to check that some string contains a substring in the unit test code?

Dear Developers and QA, I would like to ask a very simple question, but it is very important for me. Please, consider the following test: When I enter the search phrase “Hello World” into the ...
4
votes
1answer
293 views

PHP: code instrumentation library to capture/record new unit test cases?

I have a library that seems to work as intended. I would like to add some instrumentation to the library to capture (some) current input and the result and save that as a test case. Is there a library ...
4
votes
1answer
293 views

Selenium tests aren´t launched anymore

I used to be able to launch all my Selenium2 WebDriver tests in Ruby on Rails via rake test:units. But recently, my test case(s) won't be found anymore. I dont get any notification or error message. ...