tdd

What is a quality real world example of TDD in action? [closed]

江枫思渺然 提交于 2019-12-03 06:53:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . What is a quality real world example of TDD in action? What small-to-medium open source projects in .net are out there that show off best practice in TDD and might work as a reference for doing TDD right? I am looking more for an example of a living breathing project(s) that serves as a good example of TDD.

How TDD can be applied to Django Class based Generic Views?

谁说我不能喝 提交于 2019-12-03 06:45:54
问题 Since Class based Generic Views in Django involve some work by the framework I find very hard to work with them in a TDD style. Now I use the TestClient to access the view from the http mocked stack, but I would prefer to properly unittest specific methods (es. overrides of get_object and get_queryset ) before 'functional' testing with the TestClient. Is there a ( quick ) way to obtain a proper instance of a ClassView to perform unit test on it? 回答1: Generally, that would include creating a

Getting Started with TDD?

醉酒当歌 提交于 2019-12-03 06:12:24
We are in the initial phase of trying to implement TDD. I demo'd the Visual Studio Team System code coverage / TDD tools and the team is excited at the possibilities. Currently we use Devpartner for code coverage, but we want to eliminate it because its expensive. We have very limited experience in TDD and want to make sure we don't go a wrong direction. Currently we are using SourceSafe for source control but will be migrating to Team System in about a year. I can tell you our applications are very data centric. We have about 900 tables, 6000 stored procedures, and about 45GB of data. We have

Unit testing MFC UI applications?

泪湿孤枕 提交于 2019-12-03 05:53:07
问题 How do you unit test a large MFC UI application? We have a few large MFC applications that have been in development for many years, we use some standard automated QA tools to run basic scripts to check fundamentals, file open etc. These are run by the QA group post the daily build. But we would like to introduce procedures such that individual developers can build and run tests against dialogs, menus, and other visual elements of the application before submitting code to the daily build. I

Starting a TDD project from scratch

我只是一个虾纸丫 提交于 2019-12-03 05:49:30
I read a lot of question and answer on TDD and unit testing on SO but I found nothing that answer to that: where do I start from? Me and team already done a couple of project in which we adopted the use of unit testing, for our code... but code first and then unit testing. At some point of the development process, it became quite natural to write the test first and then the code, bringing us to a more TDD style. Now we would like to make the next step and try to start a new project with TDD from the beginning. Here's the problem... where to start from? Which is the first test I'd write when I

How to deal with interface overuse in TDD?

懵懂的女人 提交于 2019-12-03 05:43:53
问题 I've noticed that when I'm doing TDD it often leads to a very large amount of interfaces. For classes that have dependencies, they are injected through the constructor in the usual manner: public class SomeClass { public SomeClass(IDependencyA first, IDependency second) { // ... } } The result is that almost every class will implement an interface. Yes, the code will be decoupled and can be tested very easily in isolation, but there will also be extra levels of indirection that just makes me

Why are TDD 'Spikes' called 'Spikes?

久未见 提交于 2019-12-03 05:28:16
问题 The test driven development guys refer to a quick, exploratory, investigation that involves coding something up to see if it works , a spike . Any ideas why they came up with that word? Update: The coinage by Kent Beck looks like the 'original' one to me, although his usage of the word doesn't make much sense in my opinion. Coding up a quick test is 'putting a spike through the project'? Interestingly, it seems he stopped using the term because it conjured up various meanings to different

Unit testing Scala

大兔子大兔子 提交于 2019-12-03 05:28:15
问题 I just recently started learning the Scala language and would like to do it in TDD-way. Could you share your experiences on the unit testing frameworks there are for Scala and the pros/cons of them. I'm using IntelliJ IDEA for Scala development, so it would be nice to be able to run the tests with IDE-support. 回答1: Have you looked at ScalaTest ? I've not used it, but it comes from Bill Venners and co at Artima, and consequently I suspect it'll do the job. It doesn't appear to have IDE

how to avoid returning mocks from a mocked object list

僤鯓⒐⒋嵵緔 提交于 2019-12-03 05:16:47
I'm trying out mock/responsibility driven design. I seem to have problems to avoid returning mocks from mocks in the case of objects that need a service to retrieve other objects. An example could be an object that checks whether the bills from last month are paid. It needs a service that retrieves a list of bills. So I need to mock that billRetrievalService in my tests. At the same time I need that BillRetrievalMock to return mocked Bills (since I don't want my test to rely on the correctness of the Bill implementation). Is my design flawed? Is there a better way to test this? Or is this the

Open source projects that demonstrate TDD and SOLID priciples [closed]

孤街浪徒 提交于 2019-12-03 05:10:42
I asked a similar question before, and got some good answers, but I think it was too general. Examples of great software design and implementation Does anyone know of any open-source projects that demonstrate really good TDD practices, and SOLID principles? TDD and SOLID are widely publicized, but I've never seen it really done myself, I'd just like to get an idea of what it might look like in a project (large or small)? Spring Framework Uncle Bob FitNesse . This is about 50K lines of Java code. It was build with TDD , and has about 90% code coverage (probably higher). There is a strong use of