itevent: Чому програмісти не тестують?
Post on 18-Oct-2014
366 views
DESCRIPTION
Чому програмісти не тестують? Чи траплялася вам ситуація, коли на ретроспективі, ви домовилися що будете писати тести. І всі розуміють яку користь вони дадуть. Але й після цього тести пишуться дуже рідко. Ця презентація є спробою знайти причини і роздумом на тему: “Які технічні знання, зміни в технічному і соціальному середовиці необхідні для покращення тестів”. Юрій ЧуловськийTRANSCRIPT
![Page 1: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/1.jpg)
Why don’t developers
test?
Audience: leads, developers
![Page 2: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/2.jpg)
Yuriy Chulovskyy [email protected] http://www.linkedin.com/in/yuriychulovskyy https://github.com/ychulovskyy/desires
8+ years of software development experience
3+ years experience in team leading
10 commercial projects
![Page 3: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/3.jpg)
Issues with testsInspirationAnalysisQ&A (any time)
![Page 4: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/4.jpg)
What issues with tests did you meet?
![Page 5: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/5.jpg)
Inspired by…
John Sonmez
http://simpleprogrammer.com/2010/12/12/back-to-basics-why-unit-testing-is-hard/
http://www.lektorium.tv/lecture/?id=14264
Maxim DorofeevSimaon Sinek
http://www.youtube.com/watch?v=u4ZoJKF_VuA
![Page 6: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/6.jpg)
Why? How? What?
![Page 7: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/7.jpg)
How?
• Check that changes works as expected• Check nothing is broken Do mentioned items in a few seconds
Why?
![Page 8: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/8.jpg)
• Write tests for new/changed functionality• Support test• Run tests locally to verify your changes• Run tests at CI server to control general picture
What to do?
![Page 9: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/9.jpg)
Developers rarely write tests for new functionality
Tests have low priority
Datasets in XML files Many test fails
Tests are not part of “Definition of Done”
Developers do not use tests to check their
changes locally
Tests are not supported
That is why
Hard to localize the issue
Hard to support tests
Unclear reason of test failure: changed or broken functionality?
Test suite contains of 3 parts: 1) tests that prepare data2) tests that do manipulation3) tests that validate results
Bad test structure
Hard to extend “best practices” to all teams
Unknown correct behavior
No time to create “Gold test definition”
Unclear which test suite to run to verify the
changes
Running all the test locally will take 10 hours and do
not provide “diffs”
No mapping like “feature – test suite”
Nobody is responsible for this
Cannot run tests from IDE
No unit test, only regression tests
Nobody writes unit tests
It’s easier to write integ-ration tests than use Mocks
We have no experience in Mocks
All items have high coupling
Bad design
No time for planning
Nobody is responsible for reviewing test results from CI on daily basis and
assigning tasks to fix the failures
![Page 10: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/10.jpg)
Developers do not use tests to
check their changes locally
Developers rarely write tests for
new functionality
Tests are not supported
Tests are not part of
“Definition of Done”
That is why
Tests have low priority
Do we write tests for new functionality?
![Page 11: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/11.jpg)
Developers do not use tests to check their
changes locally
Tests are not supported
Many tests fails
Hard to support tests
Test is low priority item
Hard to localize the issue
Test suite contains of 3 parts: 1) tests that prepare data2) tests that do manipulation3) tests that validate results
Do we support tests?
Unclear reason of test failure: changed or broken functionality?
Datasets in XML files
![Page 12: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/12.jpg)
Unknown correct behavior
Bad test structure
Do we support tests?
No time to create “Gold test definition”
Hard to extend “best practices” to
all teams
![Page 13: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/13.jpg)
Do we use tests to verify local changes?
Developers do not use tests to
check their changes locally
Developers rarely write tests for
new functionality
Tests are not supported
That is why
Many tests fails
Unclear which test suite to run to verify the changes
Running all the test locally will take 10 hours and do
not provide “diffs”
![Page 14: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/14.jpg)
No mapping like “feature – test suite”
Do we use tests to verify local changes?
Nobody is responsible for this
Cannot run tests from IDE
No unit test, only regression tests
Nobody writes unit tests
We have no experience in
Mocks
It’s easier to write integ-
ration tests than use Mocks
All items have high coupling
Bad design
No time for planning
![Page 15: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/15.jpg)
Do we use tests to verify all changes?
Many tests fails
Nobody is responsible for reviewing test results on daily basis and assigning tasks to fix
the failures
![Page 16: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/16.jpg)
Technical Environment Social
We have no experience in Mocks
Cannot run tests from IDE Tests are not part of “Definition of Done”
It’s easier to write integration tests than use Mocks
Test suite contains of 3 parts: test to setup data, tests to do manipulation, tests to verify data
No time to create “Gold test definition”
Unclear reason of test failure: changed or broken functionality?
Hard to extend “best practices” to all teams
Unclear which test suite to run to verify the changes
Tests have low priority
Many tests fails Nobody is responsible for reviewing test results on daily basis and assigning tasks to fix the failures
Datasets in XML No mapping like “feature – test suite”
![Page 17: itEvent: Чому програмісти не тестують?](https://reader033.vdocuments.net/reader033/viewer/2022061105/54435e68afaf9ff3098b4980/html5/thumbnails/17.jpg)
Let’s try this technique for your project?