<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE>
BLOCKQUOTE {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
P {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
BODY {
LINE-HEIGHT: 1.5; FONT-FAMILY: Segoe UI; COLOR: #000080; FONT-SIZE: 10.5pt
}
</STYLE>
<META name=GENERATOR content="MSHTML 8.00.7601.18094"></HEAD>
<BODY style="MARGIN: 10px">
<DIV>Hi Dieter, </DIV>
<DIV> </DIV>
<DIV>thanks for your reply. I was trying to apply the GSOC topic:
Automatic testing. so I want to check with you guys about the fomal
process</DIV>
<DIV> </DIV>
<DIV>
<DIV>>
What do you mean by regression tests? How are they different from unit tests?</DIV>
<DIV>>
The process you describe sounds reasonable. If you rearrange the order</DIV>
<DIV>>
a bit, and add codechecking to your process, you are on your way of</DIV>
<DIV>>
writing good code (see below for suggestions)</DIV>
<DIV> </DIV>
<DIV>In my mind, the regression tests is different from the unit tests. or in
other word, we can say that the regression test include Unit tests.</DIV>
<DIV>the regression test can include function test case beside unit tests.</DIV>
<DIV> </DIV>
<DIV>In my mind, in order to gurantee the code quality, UNIT test just cover the
code logic, but Fuinctional test can be end to end case with real
case.</DIV>
<DIV> </DIV>
<DIV>> In my mind, the fomal processes should be:</DIV>
<DIV>> 1. add UT code</DIV>
<DIV>>
(TDD [0] principle, write tests first, then start implementing the class/method)</DIV>
<DIV>> 2. add logic code</DIV>
<DIV>> 3. test on dev box</DIV>
<DIV>> 4. run UT & regression test on dev box</DIV>
<DIV>> 5. code review after pass 1-4</DIV>
<DIV> </DIV>
<DIV>>
-> check coding style compliance, with PHP_CodeSniffer and fix the</DIV>
<DIV>> reported issues.</DIV>
<DIV>>
You can run Jenkins on your own box, or execute `phpcs filename` on</DIV>
<DIV>>
the command line, more info on setting up Jenkins [1]</DIV>
<DIV> </DIV>
<DIV>> > 6. checkin code</DIV>
<DIV>>> 7. check CI build</DIV>
<DIV>>> .....</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>I agree with you. so the process should be:</DIV>
<DIV>1. Add UT code</DIV>
<DIV>2. Add logic code</DIV>
<DIV>3. test on dev box</DIV>
<DIV>4.
run UT & regression test on dev box</DIV>
<DIV>5.
check coding style compliance, with PHP_CodeSniffer
<---- I think we should do it before code-review</DIV>
<DIV>6. code review </DIV>
<DIV>7 checkin code</DIV>
<DIV>8 check CI build result</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>thanks,</DIV>
<DIV> </DIV>
<DIV>Adam</DIV></DIV></BODY></HTML>