The GOOS book teaches me to start my software from the walking skeleton, making sure that we can deploy our software on day one. What are your thoughts about presenter-first design? I think that's a good approach too, starting from the top layer and work your way until you touch the system.
On 8.5.2013, at 19.48, Johnny Smith <johnny.s...@gmail.com> wrote:
> as the GUI becomes more complex, it's painful to do the testing from the inputs.
What makes testing from inputs painful? It is my experience that if the UI is hard to test it is hard to use as well.
I've found that there is often unneeded complexity in the UI that is reflected to the code, and vice versa.
The GOOS book teaches me to start my software from the walking skeleton, making sure that we can deploy our software on day one. What are your thoughts about presenter-first design? I think that's a good approach too, starting from the top layer and work your way until you touch the system.
--
So the key is to start at the outermost layer as possible right? If starting from GUI is difficult, at least I have to start from the code behind the GUI just like Nat said.
By the way, why the MVP/MVC pattern is never stated explicitly in the book? Is it because the pattern will naturally exist as the code base grows? If my understanding is correct, then is it true that the AuctionSniper is the presenter and the SniperListener is the view?
I even used Window Licker. After a bit of playing around with that, I switched to using JavaFX and Jemmy-FX, wick I liked lot better (sorry guys, it seemed window licker was a bit abandoned).
So what did you do with your acceptance tests after that? Do you build the walking skeleton when using presenter-first design?
This time I wanted to focus purely on unit tests, or what we like to call "class isolation tests" (testing a single class and mocking all collaborators) because the word Unit is defined so differently by different people.
--
When I started this project, I focused so much on the Walking Skeleton that I totally did not get into doing the Unit tests hardly at all. I always felt that my acceptance tests were covering what I needed them to, so it felt dumb to then write a unit test as well. I ended up essentially writing EVERYTHING from the acceptance test point, which was once again WRONG! I ended up having lots and lots of tests at this level (with wonderful coverage). As you can imagine, they soon became cumbersome and brittle. They were also not helping me much in the way of design. They also take a huge amount of work. I was spending much more time writing and fixing tests than I was writing production code. We did NOT have the presenter mechanisms in place at this point.
...
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I think it's important to keep a distinction between acceptance tests and end-to-end tests. Although acceptance tests are often written as end-to-end tests, there is nothing that says they have to be. If you write your acceptance test to express the intention rather than the implementation, you can often hook them in at a inner level - even down to testing a single class. Those kinds of acceptance tests run super-fast and if you need to redesign the class you can hook the test so it runs at a wider level (e.g. module or end-to-end level) then when you refactor you are protected by tests.
David
On Monday, May 13, 2013 5:14:42 PM UTC+1, Rick Pingry wrote:When I started this project, I focused so much on the Walking Skeleton that I totally did not get into doing the Unit tests hardly at all. I always felt that my acceptance tests were covering what I needed them to, so it felt dumb to then write a unit test as well. I ended up essentially writing EVERYTHING from the acceptance test point, which was once again WRONG! I ended up having lots and lots of tests at this level (with wonderful coverage). As you can imagine, they soon became cumbersome and brittle. They were also not helping me much in the way of design. They also take a huge amount of work. I was spending much more time writing and fixing tests than I was writing production code. We did NOT have the presenter mechanisms in place at this point....
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to a topic in the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/growing-object-oriented-software/H6tNVvNCFYM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to growing-object-oriente...@googlegroups.com.
--
I think I need some help too. After reading the book, I think that acceptance tests exist only to tell us whether a feature is complete, but how much is a feature?If I have a form that has 10 fields to be validated before submitting, do I have to write at least 11 acceptance tests? 1 for each invalid fields and 1 for a success case. As confused as Rick do, when is not the correct time to write acceptance tests? Do I have to write 2(failed and successful login) tests for a login scenario?
On Monday, May 13, 2013 11:14:42 PM UTC+7, Rick Pingry wrote:So what did you do with your acceptance tests after that? Do you build the walking skeleton when using presenter-first design?When I started this project, I focused so much on the Walking Skeleton that I totally did not get into doing the Unit tests hardly at all. I always felt that my acceptance tests were covering what I needed them to, so it felt dumb to then write a unit test as well. I ended up essentially writing EVERYTHING from the acceptance test point, which was once again WRONG! I ended up having lots and lots of tests at this level (with wonderful coverage). As you can imagine, they soon became cumbersome and brittle. They were also not helping me much in the way of design. They also take a huge amount of work. I was spending much more time writing and fixing tests than I was writing production code. We did NOT have the presenter mechanisms in place at this point.So I took a big step back. (I should say here that I am very lucky right now to be working on a project where part of the whole goal is to be working on a test driven process as well as getting actual code out, so my client's are very patient with my fumbling around).This time I wanted to focus purely on unit tests, or what we like to call "class isolation tests" (testing a single class and mocking all collaborators) because the word Unit is defined so differently by different people. This time, we made our acceptance tests purely manual tests, and we are not concerned with running them after we finish the unit, so they don't help much for regression. Our particular application is really easy to deploy and run, and I knew that I would always be running the app to see if I actually did what I set out to do anyway. I knew I would do that regardless of the acceptance tests anyway, and I had such a bad taste in my mouth from the acceptance tests, that I needed a break from them.So, that is where we are now. To answer your question then, No, no acceptance tests using the Presenter paradigm, but I know that is not quite right either. I need to slide back into doing them again at some level, but I am not sure how, so I could use some help from someone with ideas. When reading the GOOS book, I have a hard time seeing and understanding the transition between writing the acceptance tests and then dropping down to write the unit tests.I could make it so every change in the code starts with an acceptance test and then drop down to writing unit tests, but that got me where I was before. It was said there should be far fewer acceptance tests than unit tests. So, when do you write an acceptance test first and when do you not?I have been toying around with the idea of writing "Integration" tests that only mock the view/controller boundaries and starting everything with a test from there that is really the user story, and then drop down through each layer of the application, writing isolation tests as I go. It seems that this route would provide fast tests that are not so brittle, and I could have more confidence in them from a regression stand-point (since they do cover several layers at once and their integration) JBrains (from what I understand) seems to not like any level of integration tests, and makes me believe that my isolation tests are sufficient.One thing that my clients really like is watching the end-to-end tests play. In particular, we are writing what we call "Tutorial Tests". We automate using the software for something significant the end user would want to do, perhaps something that is in the user's manual. We actually slow the tests down a little so a human watching can see the interactions. We don't even really need to check for much in the tests, because if we actually see the test run then we are pretty confident that everything is ok. This would certainly show that the system is together and is a rather beefy "Walking Skeleton". Perhaps that would suffice as a walking skeleton tests to really prove the entire app is working, but then have integration tests for each interaction in the user story, which serve as great regression tests, then isolation tests at each layer in the code... Ideas anyone? Am I heading in the right direction?
--
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
--
-- Rick--
So, at the top level, it is the DirectCallTests and the WebTests functions that set up the environment either way?
One last question, do you have AT's along every logical boundary? If you know you need to make some kind of check somewhere, do you always write an AT first, and then a Unit test down where the check actually happens? If not, how do you decide whether to do it or not?
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
>> Yes. The "some kind of check somewhere" need to be justified by at least one AT. and this one AT imply in one or more unit tests. The ATs always guide what has to be done.What you are saying really resonates with me, thanks so much for your ideas.So, have you ever had a time where you were tempted to JUST write the AT's, and NOT tests lower down? Do you still feel like the Unit tests have their own value to make them worth it? The AT's certainly have more ability to handle regression failures. I know that the real selling point of Unit Tests is their ability to drive design. I don't know that I have completely bought into the idea yet, so I am still struggling.
I guess my question come to this...When you know that you have an acceptance test covering the code, does that affect when you make a decision to write a unit test or not? I am trying to resolve "too simple to test" with "never write a line of code without a failing unit test".
So're you verifying the intra-cluster communications at all? Or just inter-?
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
And if the latter, does it suggest a missing abstraction?
You received this message because you are subscribed to a topic in the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/growing-object-oriented-software/H6tNVvNCFYM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to growing-object-oriente...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.