3. About Me
⢠Work for the University of California, Irvine
⢠Computer Scientist
⢠Developer Cheerleader
⢠Education Junkie
3
4. About Me
⢠WordPress Skillz
â Reaching my 10th anniversary developing
with WordPress
â Started with 2.0.5, building a custom theme.
â Ran my own company for four years
â Joined Zeek for almost two years
â Currently build highly specialized custom
themes and plugins for UCI.
4
5. About This Presentation
⢠Geared towards intermediate QA testers
and Developers and also for
stakeholders/clients/customers
⢠Assumptions:
â You know what WordPress is.
â You know what PHP is.
â You have written PHP code several times.
Successfully. Or.
â You test all the things.
5
6. About This Presentation
⢠Weâll go over
â The Developer Workflow(s)
â Different Types of Tests
â Automated Testing
â Demo
â Last Words
6
7. How it Currently Works
7
⢠Generic Software Development Lifecycle
â In the dinosaur days of computers, the
majority of its users were very technical
people.
â As computers became more accessible (and
smaller), more and more users began to use it
â Developers needed to create a process to
think outside of their own processes to
accommodate non-technical users
8. How it Currently Works
8
⢠Generic Software Development Lifecycle
(cont)
â Many various methods were created to
attempt to meet this need
â One of these is the Software Development
Lifecycle (which was a similar process used in
other disciplines)
â It is a top down approach: generic to specific
â Specification, Design, Coding
9. How it Currently Works
9
⢠Generic Software Development Lifecycle
(cont)
â Waterfall method is created in the â70s.
â Structured analysis, Structured design,
Structured programming (sounds a lot like
specification, design, and coding)
â Most developers tend to use Define, Design,
Develop, Deploy, Maintain.
12. How it Currently Works
12
⢠Full Software Development Lifecycle
â Many developers on teams tend to use some
form of the full development lifecycle, as there
tends to need to be some form of
accountability for teams.
â This includes: feasibility study, requirements
definition, software design, implementation
and unit testing, integration and system
testing, operation and maintenance.
17. Black Box Testing
17
⢠Tests against requirements and
functionality. Is not concerned with the
internal workings.
⢠âIf I put in 2+4, I expect 6. Does that
work?â
19. White Box
19
⢠Tests against requirements and
functionality with knowledge of the inner
workings.
⢠âI know that I this system has these
conditionals, so I will test all possible
outcomes.â
21. Unit Testing
21
⢠Tests specific methods or functions,
created by a programmer
⢠âDoes function
addTwoIntegers($num1,$num2) work as
expected?â
23. Integration Testing
23
⢠Testing of whole application after new
work has been integrated as they interact
with the client/server
⢠âDoes this siteâs individual modules still
work as expected when we put it all
together?â
25. Functional Testing
25
⢠Black Box testing for specific functional
requirements.
⢠âIf I tell it to add five text inputs and send
an email, does it add five inputs and send
an email as expected?â
26. Systems Testing
26
⢠Black Box Testing based on overall
requirements.
⢠âTesting All the Thingsâ. âDoes this system
meet all of the requirements as
expected?â
27. End-to-end Testing
27
⢠Similar to Systems, but also tests
interaction between various elements,
protocols, layers and servers.
⢠âTesting All the Things and Moarâ. âDoes
this system meet all of the requirements
as expected and communicate as
expected to its various parts?â
28. Sanity Testing
28
⢠A pre-test to make sure the new
development is done enough to fully test.
⢠âDoes it at least work a little bit?â
29. Regression Testing
29
⢠Testing the whole application after
something has been modified to see if
something was broken as a result of the
modification.
⢠âDoes it STILL work as expected?â
30. Acceptance Testing
30
⢠User or Customer does a round of manual
tests to make sure that it meets their
requirements/needs
⢠âDoes the client think it works as
expected?â
31. Stress Testing
31
⢠Testing Performance Requirements
⢠âCan more than one interaction happen at
the same time? How many more than
one?â
32. Usability Testing
32
⢠Testing for user-friendliness. This can be
done BEFORE and AFTER development
phase.
⢠âYeah, it works, but is it easy to use?â
34. Which testing is important for
developers?
⢠Black box
⢠White box
⢠Unit
⢠Integration
⢠Functional
⢠System
⢠End-to-end
⢠Sanity
⢠Regression
⢠Acceptance
⢠Load
⢠Stress
⢠Performance
⢠Usability
34
Source: http://www.softwaretestinghelp.com/types-of-software-testing/
35. For the Developers
35
⢠Which testing is important for developers?
â All of them (know thy tester and thy testerâs
methods)
â But especially
⢠Unit
⢠Functional
⢠Systems
⢠Integration
37. Which testing is important for testers?
⢠Black box
⢠White box
⢠Unit
⢠Integration
⢠Functional
⢠System
⢠End-to-end
⢠Sanity
⢠Regression
⢠Acceptance
⢠Load
⢠Stress
⢠Performance
⢠Usability
37
Source: http://www.softwaretestinghelp.com/types-of-software-testing/
38. For the Testers
38
⢠Which testing is important for testers?
â All of them (uphold they developer to unit
tests)
â But especially
⢠Black Box
⢠White Box
⢠Integration
⢠Systems
⢠Sanity
40. Which testing is important for
Clients/Stakeholders?
⢠Black box
⢠White box
⢠Unit
⢠Integration
⢠Functional
⢠System
⢠End-to-end
⢠Sanity
⢠Regression
⢠Acceptance
⢠Load
⢠Stress
⢠Performance
⢠Usability
40
Source: http://www.softwaretestinghelp.com/types-of-software-testing/
41. For the Clients/Stakeholders
41
⢠Which testing is important for
clients/stakeholders?
⢠Black Box
⢠Usability
⢠Regression
⢠Acceptance
42. For the Clients/Stakeholders
42
⢠Which testing is important for
clients/stakeholders?
⢠Black Box
⢠Usability
⢠Regression
⢠Acceptance
44. What does Automation of Testing
mean?
44
⢠The traditional/easiest way to test what
you develop is to make a change, and
then load the app to see if that change
was effective. Very Manual
⢠Automated Testing means to write code to
test code and use testing software to test
the front-end. Donât rely on the old manual
check.
45. How does this apply to WordPress?
45
⢠WordPress utilizes a âtest suiteâ âwhich
have multiple test cases and a library and
command line tool that runs the test suite
or suitesâ according to WordPressâ
automated testing core handbook page
⢠For this, they use phpUnit.
https://phpunit.de
46. How does this apply to WordPress?
46
⢠PHPUnit has a series of commands that
you can use to run all tests, specific tests,
or specific types of tests.
47. Developer Workflow
47
⢠When you are ready to write your plugin:
â Think of the outcomes you want for your
plugin
â Think of the individual methods you want to
write. Should have one output.
â Write a test that checks that the output is what
you expect.
â Write your method.
â Lather. Rinse. Repeat.
48. Developer Workflow
48
⢠Testing Tools
⢠phpUnit (official wordpress test suite)
⢠WordPress Developer Branch
â https://make.wordpress.org/core/handbook/automa
⢠Terminal or Editor with Testing Integrated
50. Developer Workflow
50
⢠Put your tests IN your plugin
⢠/plugins/[plugindir]/tests/test-
[pluginslug].php
⢠Add a phpunit.xml file:
⢠/plugins/[plugindir]/tests/phpunit.xml
55. Tester Workflow
55
⢠When you are ready to test
â Be familiar with the general requirements for
the site as a whole
â Read the requirements of the change request
â Focus on specifically what is supposed to
have changed.
â Write a test while waiting for the change.
â Run the test once you get the change from
the developer
57. Tester Workflow
57
⢠Selenium
â Installationhttp
://geekpad.ca/blog/post/automating-browser-testi
⢠First you must download the Selenium server and
the Internet Explorer Server from
http://docs.seleniumhq.org/download/
⢠Then you must download the Chrome server from
http://chromedriver.storage.googleapis.com/index
.html
58. Tester Workflow
58
⢠Selenium
â Installation (continued)
⢠You do not need to download a Firefox driver
since itâs builtin the main Selenium file.
⢠Once all files have been downloaded you must
add your selenium folder to your existing path see
http://www.java.com/en/download/help/path.xml
⢠Then you can launch the server using java. With
something that looks like this
â Mac - java -jar selenium-server-standalone-[version].jar
59. Tester Workflow
59
Why is Selenium cool?
â˘Records your actions
â˘Letâs you test expected outcomes
â˘Letâs you test them in a series
60. Tester Workflow
60
Example
â˘The developer was given a task to make
sure that all instances of the word âOrange
Countyâ is replaced with the word âOCâ on
the website, for âlegal reasonsâ.
â˘Demo
62. Jenkins
62
⢠Jenkins is an award-winning application
that monitors executions of repeated jobs,
such as building a software project or jobs
run by cron. Among those things, current
Jenkins focuses on the following two jobs:
â Building/testing software projects continuously
â Monitoring executions of externally-run jobs
https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins