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.
3
votes
4answers
145 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.
...
4
votes
1answer
654 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 ...
0
votes
2answers
102 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 ...
1
vote
1answer
57 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 ...
3
votes
1answer
247 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. ...
2
votes
2answers
60 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 ...
2
votes
0answers
28 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
79 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 ...
3
votes
1answer
134 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 ...
1
vote
2answers
165 views
Selenium Selenium.Core v1.1.4322 - XPath not working
I've got the following XPath expression's working in firebug, that returns the correct element(s):
$x("(//input[@class='intervalInput timeInput'])")
returns two elements.
...
3
votes
3answers
197 views
What kind of testing is ApprovalTests.com doing and are there other similar frameworks?
I came across the ApprovalTests.com framework today and am curious how it would be classified. I am familiar with concepts of Unit Tests, functional tests, and user acceptance testing, but this seems ...
13
votes
5answers
377 views
Should I unit test small projects?
I develop small projects, and the testing is usually a functional test when I verify if the service is working as I were the user. Is this ok with small projects of 2-3 people? How do you think unit ...
3
votes
1answer
94 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 ...
4
votes
2answers
233 views
Differences between Standard for Software Component Testing (BCS, SIGIST, 2001) and BS 7925-2:1998
What (if any) are the differences between The Standard for Software Component Testing (from the British Computing Society SIGIST and available for free) and BS 7925-2 (which is available to purchase ...
0
votes
0answers
21 views
How to tests TransactionManager? And Correct Behavior of Transactions and connections?
I have three transaction services that are executed within a transaction boundary (stratTransaction or begin transaction). All three services uses different connection (No_Transaction, ...
5
votes
1answer
211 views
What are the tiers of testing that should be done on a large scale distributed system?
Let's say you have a large distributed system in the cloud that's got dozens of developers working on it and actively adding code to. Your job is to make sure all of the quality gates are used and the ...
5
votes
1answer
95 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
55 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 ...
4
votes
4answers
226 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 ...
0
votes
0answers
241 views
Custom error testing: How to find status code after page load/button click? [closed]
How to find status code after page load or button click for custom error testing?
After button click the page crashes. I want to check status code.
4
votes
1answer
217 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 ...
2
votes
2answers
294 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 ...
1
vote
1answer
102 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 ...
3
votes
3answers
805 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
459 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 ...
2
votes
4answers
398 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 ...
5
votes
4answers
566 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 ...
5
votes
3answers
268 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
150 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
62 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
98 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
126 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 ...
3
votes
1answer
104 views
xUnit tests patterns for testing threaded applications
Are there either any xUnit (or otherwise) design patterns or anti-patterns for testing threaded code?
1
vote
1answer
205 views
Pretty / GUI formatting for the nosetests.xml xUnit report?
Is there a simple tool that will generate pie charts or otherwise "pretty", graphical output based on the .xml file that nose outputs with the --with-xunit switch?
I tried googling around for one but ...
5
votes
6answers
639 views
Database code unit testing tips
I am working on developing a big 3-tier application. Database has a lot of code (stored procedures, functions, triggers...). I am looking for a valid approaches how to implement unit testing for the ...
3
votes
2answers
334 views
Creating a dummy database for automated functionality testing
I have a continuous integration build server (using Team City). When people check code in, I'd like to run a set of tests which run through a set of functional cases such as:
Using an administrator ...
2
votes
3answers
120 views
Is my test a perf unit functional smoke test or something else?
Or how I learned to stop worrying and love the bomb.
Each test is different. Some are big and talk to databases, others quick and self contained.
We all know we'd prefer the fastest and most robust ...
2
votes
1answer
189 views
Unittesting in Borland C++Builder 2006
Which unit testing framework would you use in Borland C++Builder 2006?
2
votes
3answers
134 views
Do I Need To Create Mock Classes For Every Class?
Let's say I have a system composed of three classes: A,B,C that share certain dependencies.
To test A independently, I would need to create mock objects for B and C
To test B independently, I would ...
4
votes
4answers
696 views
UI and Business Logic Testing, Am I Doing it Right? Should I Unit Test Anything Else?
Alright, so this is what I have right now.
buttonMultiply_Click(object sender, EventArgs e){
Calculator c = new Calculator();
textBoxLog.Text = "Calculation underway...";
int value1 = ...
16
votes
4answers
708 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 ...
2
votes
1answer
371 views
Philosophy to write Objective-c unit test
I am a really lost about it. I can study how write and run unit test in Objective-C with XCode, but I don't see how useful it is.
In resume, you have to write a method that will be called first to ...
9
votes
4answers
182 views
If I didn't use TDD but want to transition to agile, should I go back and create those unit tests?
In an transitioning agile environment, if there was no Test Driven Development (no unit tests created), should you create unit tests to catch up on technical debt? And to what extent? Should they ...
-3
votes
3answers
281 views
Tester Versus Test cases written by the tester [closed]
I have always believed that a great tester is one whose test cases help in discovery of a lot of bugs in the product and not one who finds a lot of bugs in a product.
In otherwords a team or a ...
11
votes
3answers
448 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 ...
11
votes
4answers
691 views
Documenting Unit Tests
We follow a BDD approach to development, we have our testers creating scenarios from a specification, and these are then given to our developers before any work is started. However, we find that some ...
5
votes
5answers
159 views
Writing tests to learn the code
My team is bringing on two new people - an intern and a full time. The intern has one semester to go, and the full time is fresh out of uni. After a two week training period, the plan management has ...
1
vote
1answer
635 views
Unit Testing The Presenter (in an MVP Context) Using Mock Objects?
Below is some code which is just the simplest MVP project I could make. How can I unit test the presenter using mock objects? Does a mock object mean a completely made up object? In this case, the ...
2
votes
2answers
358 views
Newbie question: How do I run a JUnit 3 test on Portable Firefox 3.6 in Selenium RC (1.0.3)?
I'm pretty new to selenium, and I'm following the Selenium Simplified book examples.
I'm trying to run a simple test that was created in Selenium IDE on Portable Firefox 3.6, and saved as a JUnit 3 ...
2
votes
1answer
186 views
Using Scala to build unit tests for Java?
The idea of using Scala to build unit tests for Java code has been thrown around. People are making the claim that Unit tests would be less effort to write because there's less boilerplate. In ...