brianegan / new_flutter_template

Test ideas for a new flutter template
140 stars 23 forks source link

What kind of tests should the template feature? #8

Open brianegan opened 3 years ago

brianegan commented 3 years ago

What kind of tests are useful in a template? Does it make sense to include tests at all? If so, what kind are helpful in a template?

irvine5k commented 3 years ago

Test every business logic and page.

PiotrWpl commented 3 years ago

I think that it would be a great idea to have three example tests:

this will allow new developers easily understand what is the difference between them in terms of the use-case and speed of executing.

mhadaily commented 3 years ago

Just to show how we can achieve 100% test coverage, can we test everything? It may be helpful to see how to test some parts of the application that may be unclear how to test.

burhanrashid52 commented 3 years ago

I won't look for 100% test coverage or test for every file. I agree with @PiotrWpl suggestion of having one test for each kind. It will help to understand the difference between all 3 and what to test and how much.

brianegan commented 3 years ago

Thanks everyone! @PiotrWpl very cool idea :)

@mhadaily Interesting idea! Do you think that would be best in the template itself or perhaps as part of a code lab / sample app of some kind? The only thing I worry about with adding 100% test coverage to a template is that folks will pretty much need to delete all of those tests right away. Therefore, it may be a nice demonstration that turns quickly annoying :P What do you think?

mhadaily commented 3 years ago

@brianegan I agree with you, I believe it should be part of codelab or sample, but it's nice to show how we can achieve 100% for learning purposes.