I dream of ISPWeb

Unit tester. Agile learner. Speaker. Author of Everyday Unit Testing. Co Organizer of Agile Practitioners conference at Gil Inc.
Feb. 16, 2011
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
I dream of ISPWeb
1 of 20

More Related Content

What's hot

Selenium as a trendSelenium as a trend
Selenium as a trendNataliya Holodiuk
Myth vs Reality: Understanding AI/ML for QA Automation - w/ Jonathan LippsMyth vs Reality: Understanding AI/ML for QA Automation - w/ Jonathan Lipps
Myth vs Reality: Understanding AI/ML for QA Automation - w/ Jonathan LippsApplitools
How to Deliver the Right Software (Specification by example)How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)Asier Barrenetxea
When you get lost in api testing #ForumPHPWhen you get lost in api testing #ForumPHP
When you get lost in api testing #ForumPHPPaula Čučuk
ESLint Plugin for UI TestsESLint Plugin for UI Tests
ESLint Plugin for UI TestsApplitools
Shift leftShift left
Shift leftpenetration Tester

Viewers also liked

Energy storage what weve learned from puerto ricos mtrs (saloman)Energy storage what weve learned from puerto ricos mtrs (saloman)
Energy storage what weve learned from puerto ricos mtrs (saloman)Japan Caribbean Climate Change Partnership
Thousand Smiles PitchThousand Smiles Pitch
Thousand Smiles PitchSarthak Satapathy
Google Analytics and Google AdWords for the Online MarketerGoogle Analytics and Google AdWords for the Online Marketer
Google Analytics and Google AdWords for the Online MarketerElias Dabbas
Entrepreneurial lesson number 1 : Why so many entreprenerial businesses fail Entrepreneurial lesson number 1 : Why so many entreprenerial businesses fail
Entrepreneurial lesson number 1 : Why so many entreprenerial businesses fail Clive Butkow
EY O viziune a cresterii - editia de toamna 2016EY O viziune a cresterii - editia de toamna 2016
EY O viziune a cresterii - editia de toamna 2016Mihaela Matei
不到長城非好漢不到長城非好漢
不到長城非好漢honan4108

Similar to I dream of ISPWeb

A Mockery of a persentationA Mockery of a persentation
A Mockery of a persentationGil Zilberfeld
Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012
Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012TEST Huddle
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...Turkish Testing Board
An Introduction to Developer TestingAn Introduction to Developer Testing
An Introduction to Developer TestingWill Green
Android testingAndroid testing
Android testingIgor Filippov
Productive Programmer - Using IDE effectively and various small practices to ...Productive Programmer - Using IDE effectively and various small practices to ...
Productive Programmer - Using IDE effectively and various small practices to ...Bhavin Javia

More from Gil Zilberfeld

Dirty tests and How To Clean ThemDirty tests and How To Clean Them
Dirty tests and How To Clean ThemGil Zilberfeld
Unit testing for Grown-upsUnit testing for Grown-ups
Unit testing for Grown-upsGil Zilberfeld
Zen and the art of Test Maintenance - #TestIL Meetup Tel AvivZen and the art of Test Maintenance - #TestIL Meetup Tel Aviv
Zen and the art of Test Maintenance - #TestIL Meetup Tel AvivGil Zilberfeld
Zen And the Art of Test Maintenance PresentationZen And the Art of Test Maintenance Presentation
Zen And the Art of Test Maintenance PresentationGil Zilberfeld
Spock: It's Only LogicalSpock: It's Only Logical
Spock: It's Only LogicalGil Zilberfeld
Better Estimation and PlanningBetter Estimation and Planning
Better Estimation and PlanningGil Zilberfeld

I dream of ISPWeb

Editor's Notes

  1. My Tank storyI couldn’t test parts of the system separately, and that’s what unit testing is about. If I could, it will not take 3 months till the next test, and I would know if my fixes were correct (they we’re not).
  2. How do you do unit testingHow is the SharePoint world different (or similar) to the rest of the world
  3. Testing units of the software, without the restSimple, but not easily achievable.Software is already kvetched together from the get go.And SharePoint is a 3rd party which we don’t have control over. We cannot disconnect from the server.
  4. My team was always fighting over because of broken builds.My testers did not trust the devs.As a manager, I had to deal with that. Oh the headache.Two questions: How do you know your stuff works?How do you know you haven’t broken anything?And then comes magicPeople are not afraid to make changes to their codeYou know exactly what failedIt takes a lot less time to debugNo more stupid bugzIt makes you THINK about the code you’re writing.It makes you a professional – you are responsible to test your code, not QA
  5. Moment of Hebrew:Unit testing = Automated unit testing.When I started at Bio-Rad (1997) the first thing they taught me was unit testing. Manual.VB Form, for a C++ COM componnet.This is not repeatable.When I changed my code, I did not go through all the scenarios I’ve already tested.And when you fix a bug, in a component written 6 months ago, would you even remember? No.Unit tests help you remember, and remind you.When something breaks, you’ll know immediately. The sooner the better. And mostly, that’s what automated unit tests do. They shorten the feedback cycle from weeks and months to seconds and minutes. It’s easier to fix something that you just wrote.And this is key: unit tests should run quickly. If they don’t the vicious cycle begins: No quick feedback, less test runs. Then why should I write tests if I don’t run them, and the road to hell is now paved.
  6. Let’s take a look at the environment.First we need a framework. We need to say – this is a test, and that’s the criteria for pass/fail.Then you need a runner, and result view.MSTest (yes, there’s NUnit, but you don’t need it).Show logic of webpartCreate a new projectAdd referenceShow attributesWrite //AAARename testWrite testRun test.Notice we’re testing logic.In the real world, it’s not that easy.
  7. Code is not testable by default.All kind of tutorials, don’t prepare you for testability. They give you unstructured code. This has changed about a year ago with P&P promoting unit tests.Who knows what P&P is?It’s still not enough. We’ll go into MS ambivalent relations with unit testing later.Who is using SP 2010? Some improvement there since 2008.The F5 Build/Deploy/ Test cycle is slow. It takes minutes. Slowness, kills unit tests.Speaking of which, who uses a virtual environment for development? It’s slow by nature.
  8. We’ll see about that in the next session.
  9. Dependencies is why most people stop doing unit testing.Overriding dependencies is hard.
  10. Let you change the behavior of your code, without changing it. (mostly)Basically, isolation frameworks allow you to do 2 thing by creating fake objects.
  11. This is important: Without changing my production code.
  12. The Asserts I showed you before test state: properties, fields.What happens if I want to make sure a method was called with the correct arguments?Like database connect?With SharePoint its worse, because most of the object model is designed for reading, not building it..
  13. CostBoth can fake everything.Isolator is easier to write/readMoles doesn’t have a verify.With Moles you really need to know your lambdas. It’s painful.Isolator has more features, more functionality. It is a decidedly unit testing toolMicrosoft is not pushing it – hard to find examples on the net. 1 man show.And besides, we’re smarter and better looking.
  14. it's impossible to stick with unit testing without a frameworkWhich ever tool you use you need to understand, that you need a tool.Stupid bugz.You can start by downloading Isolator and Moles. Start writing unit tests.
  15. It's a productivity toolMake it part of your tool belt