Most voted "tdd" questions
Test Driven Development (TDD) is a software development technique based on a short cycle of repetitions.
Learn more…52 questions
Sort by count of
-
41
votes2
answers3902
viewsTests, TDD, Unit Test, QA and similar. What is the difference between concepts about tests?
In the question of the goal 5 different tags for "testing" I noticed that I have some difficulty understanding all these terms about tests. Certainly tests have been very important throughout the…
testing software-engineering unit-testing tdd functional-testingasked 10 years, 6 months ago Maniero 444,682 -
30
votes2
answers28407
viewsWhat is the difference between unit test and integrated test
What’s the difference between unit test and integrated test, their benefits and examples to each other.
testing software-engineering tdd language-independentasked 8 years, 10 months ago Al Unser Albuquerque 965 -
13
votes2
answers1652
viewsHow to perform TDD on the Service layer
I participate in a project that uses MVC layers with Hibernate framework persisting in a Postgres. Junit is used for testing and Mockito is used for mocking (I still have no knowledge and practice…
-
12
votes1
answer191
viewsIs it correct for a method to make the same exception for two different reasons?
I’m practicing TDD simulating an alarm system. Alarm centers work connected to sensors that detect intrusion (opening a door or window, or movement within a room, for example). They have a fixed…
-
10
votes2
answers746
viewsWhat is BDD and its relation to TDD?
In the web, when we searched for TDD, sometimes we also come across the acronym BDD. What is Behavior Driven Development (BDD)? What is your relationship with Test Driven Development (TDD)?…
-
8
votes1
answer557
viewsTDD and Unit Test, both are the same thing and have the same purpose?
Always when I read about TDD (Test Driven Development) it is related to Unit test, It makes me believe that TDD is the same as Unit test, and I don’t know if my definition is correct in relation to…
-
8
votes3
answers2984
viewsHow to name a unit test when using TDD?
It is common to use nouns to name: classes (Car, Vehicle, Notafiscal); action verbs (infinitive or not) for method names (Calculartotal/Calculatotal, Lertodasaslinhas, Closeconnection, Abra…
-
7
votes1
answer1373
viewsWhat is Feature Driven Development (FDD)?
I was researching about BDD, TDD and DDD and came across FDD (Feature Driven Development), after all: What is FDD? It has some relationship with BDD, TDD and DDD?…
-
6
votes2
answers967
viewsHow to create a test with Rspec to verify user feedback?
That one describe below is the default that Rspec creates. I have a hard time working with TDD (Test Driven Development) and it is difficult to understand the whole procedure. For example, I need to…
-
6
votes1
answer699
viewsWhat tools are available for code coverage in . NET in Visual Studio?
I have developed systems using TDD in .NET. Recently, the company I work with, bought the version of Visual Studio 2013 Pro and, in this version we do not have the code coverage tool (code…
-
4
votes3
answers370
viewsHow to perform TDD using Hibernate
I would like to know how to perform TDD using Hibernate. I have been informed that this ORM stores memory before recording into possible, so I wanted to know how to test a data that is in memory.…
-
4
votes3
answers176
viewsHow to work with tests and fixtures in a bank that contains foreign key constraints in Rails?
I am using Rubyonrails 4.1 and Postgresql database and use the Gem Foreigner to create foreign key restrictions in the bank. It turns out that this makes some tasks with fixtures. When I try to run…
-
4
votes1
answer195
viewsTDD improves the design?
Some people say that TDD (Test Driven Development) is responsible for improving design of the project classes. Others say this does not happen or is not necessarily true. TDD by itself, without any…
-
4
votes3
answers609
viewsHow to compare 2 Arrays to Assert.Equals?
I need to compare two arrays on Assert.Equals. When I test the method in race it is right but the test does not pass. Code: public void SeparaStringTest() { RecebeComando recebecomando = new…
-
3
votes2
answers1762
viewsVisual Studio Test Explorer does not find the tests
I’m having a difficulty in Visual Studio 2013, Test Explorer is not loading the tests at any time, either after Build, or through Run Tests / CTRL+R, T. Does anyone have any clue what it might be? I…
-
3
votes1
answer333
viewsWeb Service Testing with Arquillian
I’m doing a unit test class and I’m using Arquillian because of CDI, in this case I’m testing a Web Service for authentication of company users. Follows the source of the test class:…
-
3
votes2
answers403
viewsTDD in existing function (Django)
I need to learn more about TDD. What a test it should be to pass? The function already works, just wanted to know what would be a test? @login_required def create_contract(request, proposal_id): if…
-
3
votes1
answer56
viewsHow to write tests for an External API call?
I am researching about Unit Testing and TDD and wanted to apply this to some scripts I have developed. The issue is that these scripts create data on an external service by calling API methods, for…
-
3
votes2
answers246
viewsTDD with micro services
I have two micro services one depends on the other, the micro service B depends on the A. I wrote tests for the A and for the B. The test of the A wheel does not depend on any other project, but the…
tddasked 6 years, 5 months ago Bruno Roberto 81 -
2
votes3
answers847
viewsCorrect model test (Rspec)
I created a test to validate my model and I want to know if it is correct. describe Article do it "object article create is valid?" do article = Article.create article.title = "Title for Test"…
-
2
votes1
answer527
viewsDelphi Unit Test
I am implementing Dunit in the company and my question is the following: there is some way to click the button of a "Showmessage", of a form I can, but I would like when the showmessage window…
-
2
votes1
answer137
viewsIs it advisable to write automated tests for the user interface?
When it comes to unit tests and TDD, we usually think of so-called "business logic" tests, which are based on requirements, etc. But we also find on the web examples of tests of the user interface,…
-
2
votes1
answer389
viewsWorking with Javaweb Dates
Hello, I am doing a project that manages all projects of my company, I am using Hibernate, Javaweb, primefaces, TDD and MVC standard. My entity is shaped like this for date variables:…
-
2
votes1
answer339
viewsUnit test of a javascript fetch function with jest or mocha
I’m starting studies with TDD and came across a function like this: const fetchexample = callback => { fetch('/token', { method: 'POST', body: 'user=teste' }).then(res => res.json()).then(json…
-
2
votes2
answers200
viewsIs there any way to implement an interface in a class of a DLL that I can only read?
I am using a DLL that has several classes. I would like to dynamically implement interfaces for these classes, so that I can perform unit tests by making a mock of the same. Is there any way to do…
-
2
votes1
answer276
viewsEnsure that the unit test is validated in an IF. Unit Test
I need to create a unit test that validates the following code. But how can I guarantee that the test validates the downloaded and downloaded content? if not (os.path.exists(filename)):…
-
1
votes1
answer370
viewsError accessing input fields with Cucumber + Capybara
I was writing my Steps for my tests with the Cucumber and they are not finding the ids, Labels or Names of the forms. I’ve looked at several tutorials on the internet and really my problem is very…
-
1
votes1
answer1739
viewsHow to perform tests on private methods using Mockito
this weekend I read about the Mockito and double tests, and I came up with the following idea. Test private methods with this framework. I saw that the PowerMock performs such a procedure, but…
-
1
votes0
answers69
viewsHow does mock work in integration testing?
How to use mock in my integration tests?
-
1
votes2
answers421
viewsWhat is TDD and what is it for?
I was taking a look at PHPUnit - which is a unit testing framework . Taking a look at some tutorials, I came across a term called TDD. What comes to be TDD? And what’s his use in day-to-day…
-
1
votes3
answers332
viewsIs it recommended to test model validations?
My experience is with Ruby on Rails, but I believe my question will be for other cases. The ORM Activerecord (from Rails) allows validating in fields things like: Presence Oneness Size (of a string)…
-
1
votes1
answer21
viewsRspec - Feature test failing because elements are not rendered in test execution
I have a test Feature failing because the moment it runs some HTML elements (<li data-podcast>) not yet rendered. Does anyone know how to fix it? RSpec.describe 'Podcasts List', type: :feature…
-
1
votes0
answers48
viewsError using TDD with Ruby
Hello, I’m starting to study about TDD with Ruby on Rails and I’m following a tutorial from Nando Viera[1], but when trying to run a rake:test:Units the following error is returned:…
-
1
votes1
answer396
viewsHow do I rate a test, release or Feature?
If I create a test on something that already exists, does it enter as a release or Feature in a git-flow stream? why a test is an improvement but also something new.
-
1
votes1
answer746
viewsCoverage of Unit Tests in Laravel
By starting a repository with a new Laravel 5.5 installation and setting up test coverage and Coveralls for this, despite having only scaffolded the framework authentication and not written a single…
-
1
votes0
answers179
viewsC# As Testart Commandshandlers using Mediator and CQRS standard
I have never worked with tests before and would like to learn. I’m using the MVC + DDD + Domain Notifications + CQRS + Event Sourcing + Unity of Work and Repository standards. There is my controller…
-
0
votes1
answer500
viewsHow to test the creation of an obj and method call in a Servlet?
I’m trying to create a web application using TDD, however, I’m having a question of how to test the Servlet that processes requests and calls due logic, I don’t know how to do the assert. @Test…
-
0
votes1
answer247
viewsWhich framework do you recommend for javascript unit testing (Ecmascript 6)?
I will develop a web application using Ecmascript 6. I’d like to continue with the TDD Technique. What framework do you recommend for javascript unit testing (Ecmascript 6)?
-
0
votes1
answer66
viewsKarma+mocha Error with module Angularjs
Summary I am creating a Seed for modular design with Angularjs + Browserify + Babeljs. I am implementing the unit test part. Problem When I call the angular module it returns the error Typeerror:…
-
0
votes1
answer67
viewsPlay Framework TDD exception testing routes
I am studying the Play Framework with Java and in the documentation there is an example of route testing at the end of this page: Doc Play Framework But when trying to run the test he answers me…
-
0
votes1
answer29
viewsCodeception see() method with Yii2 does not display all page content
Hello! I am testing a PHP(7.2.1) system that uses the Yii2 framework, and for that, by default I am using codeception. When writing functional tests, several methods are not working as expected.…
-
0
votes1
answer446
viewsError running unit test in Karmajs
Good afternoon, When running the unit test in Karmajs I have as return the following errors: Using Angularjs with Requirejs, Angularamd and Instanbul. Referenceerror: Can’t find variable: module And…
-
0
votes1
answer275
viewsHelp with jest ERROR : 'Test suite failed to runReferenceError: regeneratorRuntime is not defined'
I’m starting in TDD, I’m using jest to learn. But I have a question: I’m testing the following code : export const search = (query, type) => { return…
-
0
votes1
answer608
viewsJest integration test - Nodejs API + Mongo
I would like a help in my tests, because I am doing something wrong because there is time that my test passes and soon after it does not pass more. Below are some of the two tests I have of my study…
-
0
votes2
answers83
viewsPHP Lumen - TDD test Image upload does not work in PHP’s Lumen framework
I’m trying to create a test method for uploading images using the PHP framework (Lumen). However I am having problems with the following Uploadedfile method: $request->file('images') it always…
-
0
votes2
answers105
viewsMoq function in controller test
After a few hours trying, I arrived at this test code, but still I could not understand well the function of the Mock, and without it works the same way. Note. The intention is to learn TDD with…
-
0
votes0
answers15
viewsHow to test an element using Compose?
const enhance = compose( mapStateToProps, withRouter, withApollo ) export default enhance(ManagePublicTable) In the archive Managepublictable.spec.js I’m importing the component as: import {…
-
-1
votes1
answer609
viewsSyntax Error! Java + XML
The database should be implemented in the Sqlite and should have the tables; tbprevisao and tbcidade The system should keep the data of the cities already consulted in tbcidade to avoid having to…
-
-1
votes1
answer221
viewsHow to validate if ternary operator was used in the implementation?
I want to validate through the TDD if in the implementation was applied ternary operators. How can I measure this situation? def par_impar(x): return "impar" if x % 2 else "par" Or this other?…
-
-1
votes1
answer58
viewsTreatment of negative test cases with JEST
I have a Code Jest who should test a business rule that says: No client must have an invalid CPF it(" should not be able to create a new user whith a wrong CPF",async()=>{ const repositoryFake =…