📄 functionaltests.html
字号:
<head><title>Functional Tests</title></head><body><h1><img src="logo.gif"> Functional Tests</h1>[<a href="http://c2.com/cgi/wiki?CategoryTesting">CategoryTesting</a>]
See also: <a href="http://c2.com/cgi/wiki?FunctionalTesting">FunctionalTesting</a>. Now called, in XP: <a href="http://c2.com/cgi/wiki?AcceptanceTest">AcceptanceTest</a>
<hr>
<p><a href="FunctionalTests.html">FunctionalTests</a> are programs or scripts configured to test that packages (groups of clusters of classes) meet external requirements and achieve goals, such as performance. They include screen-driving programs that test GUIs from without.
<p><a href="FunctionalTests.html">FunctionalTests</a> are a key component of software engineering, and <a href="ExtremeProgramming.html">ExtremeProgramming</a> leverages them to permit the <a href="OnsiteCustomer.html">OnsiteCustomer</a> to understand and track a project's growth.
<p><UL><li> Unlike <a href="UnitTests.html">UnitTests</a>, which test the behavior of a single class, <a href="FunctionalTests.html">FunctionalTests</a> test the entire system from end to end.
<li> Like <a href="UnitTests.html">UnitTests</a>, <a href="FunctionalTests.html">FunctionalTests</a> help development go faster as well as ensuring quality. <a href="http://c2.com/cgi/wiki?TestingLetsYouGoFast">TestingLetsYouGoFast</a>.
<p></UL>A C3 Functional Test reads input from real system input files, pays one or more employees, exports results to real result files, then reads the result files back in and compares individual results to expected values. C3 has over 400 <a href="FunctionalTests.html">FunctionalTests</a>.
<p>Specifying <a href="FunctionalTests.html">FunctionalTests</a> is the responsibility of the customer, while <a href="UnitTests.html">UnitTests</a> belong to the developers. On some teams the tests are written by the programmers, based on stories from the customer. Other teams use a separate team extracting functional test info from the customer and creating and running the actual tests. In either case, publish the results for all to see.
<p>A useful measurement of <a href="http://c2.com/cgi/wiki?ProjectVelocity">ProjectVelocity</a> is the increase in number of functional tests, and the improvement of the scores.
<p>-<a href="RonJeffries.html">RonJeffries</a>
<p><hr>
<p><a href="http://c2.com/cgi/wiki?AnnAnderson">AnnAnderson</a> just told me of a project where her brother is a tester. They were supposed to have final code over two weeks ago, and just got it. They now have seven calendar days to "test the system" before shipping. (No, he doesn't work for <a href="http://c2.com/cgi/wiki?MicrosoftCorporation">MicrosoftCorporation</a>.)
<p>In <a href="ExtremeProgramming.html">ExtremeProgramming</a>, you build a continually growing collection of functional tests. You run them all the time. You graph them <em>daily</em>, showing total tests, green for correct, red for incorrect, yellow for not yet validated if you have that case (on C3 we do). The graph, on a larger time scale, should look like this over time: <a href="http://c2.com/cgi/wiki?FunctionalTestGraph">FunctionalTestGraph</a>.
<p>More and more tests, more and more correct, leading to great certainty that the program is working.
<p>To make this work, the tests need to run automatically, and in finite time, such as overnight. To make them meaningful, you need a clean system integration every time you run the tests, such as daily.
<p>We call this process <a href="ContinuousIntegrationRelentlessTesting.html">ContinuousIntegrationRelentlessTesting</a>. --<a href="RonJeffries.html">RonJeffries</a>
<p><hr>
<p>How closely are <a href="FunctionalTests.html">FunctionalTests</a> bound to <a href="http://c2.com/cgi/wiki?UserStories">UserStories</a>?
Do <a href="FunctionalTests.html">FunctionalTests</a> accumulate completely independently, or is there
some direct correspondence with <a href="http://c2.com/cgi/wiki?UserStories">UserStories</a>? (e.g. "These three <a href="FunctionalTests.html">FunctionalTests</a>
correspond with this <a href="http://c2.com/cgi/wiki?UserStory">UserStory</a>...") Is it the case that there's no need to
list which <a href="FunctionalTests.html">FunctionalTests</a> relate back to a particular <a href="http://c2.com/cgi/wiki?UserStory">UserStory</a>?
<p>I'd like to know more about these <a href="FunctionalTests.html">FunctionalTests</a> - are there public examples that interested people can read?
<p>--<a href="http://c2.com/cgi/wiki?DafyddRees">DafyddRees</a>
<p><a href="FunctionalTests.html">FunctionalTests</a> are bound intimately to <a href="http://c2.com/cgi/wiki?UserStories">UserStories</a>. They are the means whereby the users convince themselves that the stories are correctly implemented.
<p>Typically you will have several [to many] tests per story. We have the FTs in groups (suites) relating back to stories: some existing FT suites are: Third Pay Deductions; Field Car; Vacation Payoff; Reduced Hours; Foreign Nationals.
<p>There aren't any public C3 FTs, but they look just like one would think: "An employee earning $1500 per biweek requests 3 periods' vacation pay. He is issued a check for $6000 gross in the first period, then nothing for the next three." This is all put down in some cryptic testing language, or even in code, of course.
<p><p>Okay, so what have folk done about traceability between the originally agreed <a href="http://c2.com/cgi/wiki?UserStories">UserStories</a> and the ultimate FTs that resulted out of them? Surely the functional tests are a little _more_ structured than the example above? --<a href="http://c2.com/cgi/wiki?ColinDavidMiller">ColinDavidMiller</a>
<p><hr>
<p>How do people do functional tests of GUI based systems? Presumably with some sort of automated tool. Does anyone have experience with such things?
<p><hr>
<p>Does the <a href="http://c2.com/cgi/wiki?TestingFramework">TestingFramework</a> for <a href="UnitTests.html">UnitTests</a> have any applicability here? I'm just starting to play with the <a href="http://c2.com/cgi/wiki?TestingFramework">TestingFramework</a>, and want to get max value from it. <a href="http://c2.com/cgi/wiki?BillSeitz">BillSeitz</a>
<p><hr>
<p>It is very important for the customer, that your application does all the things he wants.
So I tried several ways to check it. But every time I had to sit in front of the computer and think about the application.
<a href="FunctionalTests.html">FunctionalTests</a> gave me the possibility to check the application automatically. Pressing the <a href="http://c2.com/cgi/wiki?StartButton">StartButton</a>, going home, and on the next day, I know if I am on the right way or not.
<p><hr>
<p>I tried "acceptance test" as an alternative name for functional tests for a couple of days and really
liked it. It emphasizes the role of the tests over the way they are written,
is more approachable for customers, and aligns with existing vocab better.
Thoughts? -- <a href="KentBeck.html">KentBeck</a>
<p>I emphasize the role of functional tests as a medium of communication and
supplement to stories in the dialog between development and customer. I once
thought the name Story a bit dorky but now appreciate its simplicity. I wonder if
functional tests might be replaced by the equally simple word, Facts. Someone
might say, "I'll understand the story better once I see some <em>facts</em>.", or "how can
I help you check these <em>facts</em>?"
<p>If you like this idea you may want to change the name of unit tests also. Unit
test, you will recall, supplement code the same way facts supplement stories.
Since unit tests are made before the code, I suggests we call them Claims. One
might hear, "Now that that is done, what will we <em>claim</em> next?" or "I see that the
refactoring violates a few <em>claims</em>.". -- <a href="http://c2.com/cgi/wiki?WardCunningham">WardCunningham</a>
<hr>
But, isn't a functional test a claim also? -- <a href="http://c2.com/cgi/wiki?MichaelFeathers">MichaelFeathers</a>
<p><hr>
How about <em>constraints?</em> -- someone
<p>If I ask "what's a unit test?", most people will quickly say something about a programmer testing a smallish chunk of her own code. That's pretty close; the only XP wrinkle that isn't immediately obvious is that the tests come first.
<p>If I ask "what's a functional test?", I doubt I'd very often get an answer that included "end-to-end" or something about being based on user tasks or user stories. It seems like what people call functional tests are not, indeed, end-to-end. Rather they're tests run by an independent tester beating up on some localized feature from the user interface. A set of functional tests might explore the options in a given dialog box, for example.
<p>So, "functional test" probably does not convey the right impression to someone just hearing about XP. "Acceptance test" probably comes closer, because the connotation is that some direct user representative writes them. May have a greater chance of conveying end-to-endness. Maybe "user story tests"? Though that's missing the seemingly essential adjective-noun form. -- <a href="http://c2.com/cgi/wiki?BrianMarick">BrianMarick</a>
<p>I believe the nomenclature has indeed been changed to <a href="http://c2.com/cgi/wiki?AcceptanceTests">AcceptanceTests</a> -- <a href="http://c2.com/cgi/wiki?PhilGoodwin">PhilGoodwin</a>.
<p><hr>
<a href="http://c2.com/cgi/wiki?TopicGlossaryXp">TopicGlossaryXp</a> | <a href="http://c2.com/cgi/wiki?TopicGlossaryComputerScience">TopicGlossaryComputerScience</a>
<hr><a href="http://c2.com/cgi/wiki?edit=FunctionalTests">EditText</a> of this page (last edited January 19, 2001)<br><a href="http://c2.com/cgi/wiki?FindPage&value=FunctionalTests">FindPage</a> by browsing or searching<p><font color=gray size=-1>This page mirrored in <a href="index.html">ExtremeProgrammingRoadmap</a> as of March 31, 2001</font></body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -