testing-strategies

How to manage Build time in TDD

我只是一个虾纸丫 提交于 2020-01-13 17:57:58
问题 Hi in my project we have hundreds of test cases.These test cases are part of build process which gets triggered on every checkin and sends mail to our developer group.This project is fairly big and is been for more than five years. Now we have so many test cases that build takes more than an hour .Some of the test cases are not structured properly and after refactoring them i was able to reduce the running time substantially,but we have hundreds of test cases and refactoring them one by one

How Much Should Each Unit Test Test?

此生再无相见时 提交于 2019-12-18 17:29:10
问题 How much should each of my unit tests examine? For instance I have this test [TestMethod] public void IndexReturnsAView() { IActivityRepository repository = GetPopulatedRepository(); ActivityController activityController = GetActivityController(repository); ActionResult result = activityController.Index(); Assert.IsInstanceOfType(result, typeof(ViewResult)); } and also [TestMethod] public void IndexReturnsAViewWithAListOfActivitiesInModelData() { IActivityRepository repository =

What is the most accurate method of estimating peak bandwidth requirement for a web application?

时光毁灭记忆、已成空白 提交于 2019-12-18 03:43:22
问题 I am working on a client proposal and they will need to upgrade their network infrastructure to support hosting an ASP.NET application. Essentially, I need to estimate peak usage for a system with a known quantity of users (currently 250). A simple answer like "you'll need a dedicated T1 line" would probably suffice, but I'd like to have data to back it up. Another question referenced NetLimiter, which looks pretty slick for getting a sense of what's being used. My general thought is that I

Test Automation with Embedded Hardware

旧巷老猫 提交于 2019-12-17 17:29:16
问题 Has anyone had success automating testing directly on embedded hardware? Specifically, I am thinking of automating a battery of unit tests for hardware layer modules. We need to have greater confidence in our hardware layer code. A lot of our projects use interrupt driven timers, ADCs, serial io, serial SPI devices (flash memory) etc.. Is this even worth the effort? We typically target: Processor: 8 or 16 bit microcontrollers (some DSP stuff) Language: C (sometimes c++). 回答1: Sure. In the

What are the first tasks for implementing Unit Testing in Brownfield Applications?

て烟熏妆下的殇ゞ 提交于 2019-12-10 15:35:41
问题 Do you refactor your SQL first? Your architecture? or your code base? Do you change languages? Do you throw everything away and start from scratch? [Not refactoring] 回答1: I'm adding unit testing to a large, legacy spaghetti codebase. My approach is, when asked to solve a problem, I try to create a new wrapper around the part of the code-base which is relevant to my current task. This new wrapper is developed using TTD (writing the test first). Some of the time calling into the non-unit tested

Self Testing Tips? [closed]

余生长醉 提交于 2019-12-04 12:02:58
Basically I'm wondering if anyone has any tips for ensuring your code is well tested without getting any help from anyone else in a limited time frame? In the past I've always been able to find someone else to do testing on my code or had a dedicated quality assurance team go over everything and find all the errors. I'm usually pretty careful but I always find there a things I miss and when I test them I just don't see them. However in my current job I've been given two PHP web applications to write in a very limited time frame and I've been told I need to do all the testing myself despite my

Is there a difference between TDD and Test First Development (or Test First Programming)?

点点圈 提交于 2019-12-03 04:41:18
问题 Both ideas sound very similar to me, but there might be subtle differences or the exact same thing, explained in different ways. What is the relationship between TDD and Test First Development/Programming? 回答1: There's a difference in terms of what the driving factor is. Do you have a vague idea of what the class (or system - this can happen at different scales, of course) should look like, then think up tests which give it the actual shape? That's TDD. Do you know exactly what the public API

How Much Should Each Unit Test Test?

我们两清 提交于 2019-11-30 14:47:08
How much should each of my unit tests examine? For instance I have this test [TestMethod] public void IndexReturnsAView() { IActivityRepository repository = GetPopulatedRepository(); ActivityController activityController = GetActivityController(repository); ActionResult result = activityController.Index(); Assert.IsInstanceOfType(result, typeof(ViewResult)); } and also [TestMethod] public void IndexReturnsAViewWithAListOfActivitiesInModelData() { IActivityRepository repository = GetPopulatedRepository(); ActivityController activityController = GetActivityController(repository); ViewResult

What not to test when it comes to Unit Testing?

风格不统一 提交于 2019-11-29 20:08:00
In which parts of a project writing unit tests is nearly or really impossible? Data access? ftp? If there is an answer to this question then %100 coverage is a myth, isn't it? Here I found (via haacked something Michael Feathers says that can be an answer: He says, A test is not a unit test if: It talks to the database It communicates across the network It touches the file system It can't run at the same time as any of your other unit tests You have to do special things to your environment (such as editing config files) to run it. Again in same article he adds: Generally, unit tests are

What not to test when it comes to Unit Testing?

懵懂的女人 提交于 2019-11-28 15:23:29
问题 In which parts of a project writing unit tests is nearly or really impossible? Data access? ftp? If there is an answer to this question then %100 coverage is a myth, isn't it? 回答1: Here I found (via haacked something Michael Feathers says that can be an answer: He says, A test is not a unit test if: It talks to the database It communicates across the network It touches the file system It can't run at the same time as any of your other unit tests You have to do special things to your