Re: [TDD] How to use TDD to test a process?
Here is the a list of possible tests for the UserService.Record method: ? Record__UserWithSameNameAlreadyExists__DeleteTheUser // Asserts only on calling the method _userDao.Delete with appropriate
By
Muppalla Sree Surya Prakash
·
#35680
·
|
Re: [TDD] How to use TDD to test a process?
Thanks for the reply. Yes, actually I don't want to know the side effect. I just want to test the logic. I had planned to use stub or mock. But there are several branches. I thought it is a little
By
Jack Gao
·
#35679
·
|
Re: [TDD] How to use TDD to test a process?
Sailor.gao, your question is not very clear. I suppose you want to know if method Record actually calls GetUser then Delete or Save? So, either you reason by the side effects (such as the record has
By
Donaldson, John <john.m.donaldson@...>
·
#35678
·
|
How to use TDD to test a process?
I try to use stub but it seems not very good. I want to know how should I write the test case, and how many should it be? Could someone help me? Thank U! logic like this: public class User { public
By
Jack Gao
·
#35677
·
|
Re: TDD Database migration code
Check out Flyway https://flywaydb.org for database migrations and DbFit http://dbfit.github.io/dbfitfor database testing.
By
Tim Andersen
·
#35676
·
|
Re: [TDD] TDD Database migration code
A tool as Liquibase (http://www.liquibase.org/) would not help? name. In liquibase you create de .sql files. comparisons to another db, and picks one or more .sql files to run on the db in question. I
By
Josue Barbosa dos Santos
·
#35675
·
|
Re: [TDD] TDD Database migration code
Ironically, after attempting to install pgTap and get it talking with python instead of perl, I ended up removing all the tests and DB specific code. Mainly because of what you were advising just now.
By
Avi Kessner
·
#35674
·
|
Re: [TDD] TDD Database migration code
You are welcome! General advice: be cautious about building functionality into the database. The database should be optimized for storage and retrieval. Decisions about how to ask the right questions
By
Adam Sroka
·
#35673
·
|
Re: [TDD] TDD Database migration code
PgTap looks perfect. Thanks!
By
Avi Kessner
·
#35672
·
|
Re: [TDD] TDD Database migration code
Ideally I'm looking for something that creates databases, runs sql, is able to check the state of the database, and then destroys the database. I don't really care at what level that happens at.
By
Avi Kessner
·
#35671
·
|
Re: [TDD] TDD Database migration code
Are you talking about test driving database access code from a general purpose language? Or are you talking about test driving stuff inside the database engine? There is http://pgtap.org/ but I would
By
Adam Sroka
·
#35670
·
|
TDD Database migration code
My google searches are giving me bad results... :( Does anyone know of any good articles, or have any good hints, on how to do TDD for writing PostgresSQL, or database code? I need to write a custom
By
Avi Kessner
·
#35669
·
|
Re: [TDD] Behavioral challenges in adopting TDD
Absolutely. I did this in one organization, starting with two unit tests. By the end of the week I had figured out how to add six more, and kept adding on. My work group picked up on what I was doing,
By
Russell Gold
·
#35668
·
|
Re: [TDD] Node.js / javascript TDD Tutorials
Look at https://www.packtpub.com/application-development/learning-behavior-driven-development-javascript. I think it is really good br JM 2016-04-13 19:51 GMT+02:00 Adam Sroka adam.sroka@...
By
Jakub Milkiewicz
·
#35667
·
|
Re: [TDD] Node.js / javascript TDD Tutorials
TDD in Node.js is not substantially different than TDD in any other language. There are a dizzying array of frameworks to choose from. I have a strong preference for Jasmine as the test framework,
By
Adam Sroka
·
#35666
·
|
Re: [TDD] Node.js / javascript TDD Tutorials
James Shore has an extensive video course on the subject: http://www.letscodejavascript.com/ [testdrivendevelopment] <testdrivendevelopment@...> wrote:
By
Matteo Vaccari
·
#35665
·
|
Re: [TDD] Behavioral challenges in adopting TDD
Hi there, A short answer: Patience, love, and understanding, fostered by someone who's been there/done that. Do you have any TDD-experienced folks in the team who can work with your senior dev? A
By
Jeff Langr
·
#35664
·
|
Re: [TDD] Behavioral challenges in adopting TDD
This may not seem like a real answer. Save it and come back after all else fails. Forget about all that stuff and start doing TDD. Do it by yourself. Do it with a partner if you can. Stop trying to
By
Charlie Poole
·
#35663
·
|
Behavioral challenges in adopting TDD
HI, I am anticipating following challenges in TDD adoption. Any suggestion how to deal with such situations? The list is long :-). Thanks, 1. You have a very experienced, senior and technically sound
By
Pooja Wandile
·
#35662
·
|
Node.js / javascript TDD Tutorials
Following the previous Java thread, I'm looking for recommended and updated sources (tutorials/books/courses/etc) on TDDing javascript applications, mainly server side. Thanks, R.
By
robi.yagel
·
#35661
·
|