JaVa
   

J

J2EE. See also Hello World Model 2 example components, building with Ant and XDoclet Eclipse, 157–167 filters (Ant), 154 generating deployment descriptors, 152–154 init-params (Ant), 154 properties (Ant), 154 servlet example, 145–150 taglibs, 154–157 webdoclet tags, 150–152 components supported by, 11–12 deployment, 12–13 enterprise app deployment, 125–126 integration testing, 344 advantages, 344–345 disadvantages, 345 servlet engine compliance, 110 J2EEUnit. See Cactus JAR apps, 76 jar element (Maven), 466 JAR files (Java ARchive files), 13–14. See also EAR files applets, 14–15 creating enterprise beans project, 125 in master buildfiles, 125 EJB deployment, 257–258 executable, 15 manifest files, 13 Web browser support, 14–15 jar task (Ant), 63, 545–546 Java ARchive files. See JAR files Java Management Extensions (JMX), 496 java task (Ant), 542–543 java.awt.Robot class, 447 javac task (Ant), 543–544 Javadoc, 131–133. See also XDoclet comment blocks, 132 tags, 132–133 JBoss, 105 JButtonOperator (Jemmy), 428 JButtons, testing Jemmy, 427–429 jfcUnit, 440–441 jcoverage advantages, 409 as Ant task, 411–416 check task, 412 instrument task, 412 jtestrun task, 412 merge task, 412 report task, 412 basic block coverage, 411 branch coverage, 411, 417–419 downloading, 409 exception handling, 419–421 function coverage, 411 instrumentation, 409 byte-code, 410–411 with modified JVMs, 410 source code, 410 as Maven plugin, 416 path coverage, 411 race coverage, 411 relational operator coverage, 411 setting percentage goals, 422 statement coverage, 411, 417 writing complete tests, 421–422 JDialogOperator (Jemmy), 433 JDialogs, testing Abbot, 453–454 Jemmy, 431–433 jfcUnit, 444–445 jdodoclet task, 141 Jelly, 472–474 adding Ant tasks to Maven with, 473–474 downloading, 473 pet store example, 485 tag libraries, 472–473 Jemmy, 425–426 button test example, 427–429 dialog test example, 431–433 downloading, 425 exception handling, 426 JFrameOperator, 426 non-blocking variants, 432 primary frames, finding, 426–427 selecting tabs, 428 supressing output, 436 table test example, 429–431 timeouts, 433–436 JFCTestCase class (jfcUnit), 438 jfcUnit, 437 advantages, 445–446 button test example, 440–441 ComponentFinder class, 439 dialog test example, 444–445 downloading, 438 Finder class, 438 JFCTestCase class, 438 RobotTestHelper class, 438 selecting tabs, 440 table test example, 442–443 TestHelper class, 438–439 JFrame objects (Jemmy), finding, 426 JFrameOperator (Jemmy), 426 JMenuBarOperator (Jemmy), 432 JMeter controllers, 321–322 logic, 321 testing, 321 downloading, 319 incorporating JUnitPerf with, 274–275 launching, 322 listeners, 321–322, 325 overview, 319–320 pet store form entry test adding products, 328–329 editing products, 332–334 running, 329–332 pet store navigation test controller, setting up, 323–325 graphing test data, 327 listeners, adding, 325 running, 325 ThreadGroup, setting up, 322–323 timer, setting up, 325 tracking session information, 326–327 pet store RDBMS test, 334–335 relative worth testing, 337 saving tests, 333 TestPlans, 320–321 ThreadGroups, 320, 322–323 threads, 321 timers, 321, 325 WorkBench node, 321 JMX (Java Management Extensions), 496 jmxdoclet task, 141 JNDI API interface (enterprise beans project), 109–110 accessing, 110 loading properties, 111 JSP custom tags, 371–372, 388–390 attribute testing, 373–375 body tag testing, 376–377 BodyContent object, testing with, 380 iteration tag testing, 378–379 simple tag test, 372–373 tag library descriptor testing, 257–259 TagExtraInfo classes, 384 nested tags, 381–384 testing, 371 JspTestCase class (Cactus), 351 JspTestCases (Cactus), 371, 615–616 attribute testing, 373–375 body tag testing, 376–377 iteration tag testing, 378–379 JTabbedOperator (Jemmy), 428 JTabbedPaneOperators (Jemmy), 426–427 JTableOperator (Jemmy), 430 JTables, testing Abbot, 452–453 Jemmy, 429–431 jfcUnit, 442–443 jtestrun task (Ant), 412 JUnit. See also unit testing Ant integration junitSample project, 229–234 setting up JAR files, 229 decorating tests, 264 downloading, 222 EJBs, ProductTest code, 248–250 IDE support, 250 nesting tests, 272 overview, 222–223 reports detailed report, 230–231 output directory, 242 publishing to Web sites, 232 summary report, 230 test cases, 223 defining classes, 225 defining tests, 226–227 HashMapTest example, 223–228 overriding setUp(), 225 VectorTest, 223 writing, 223 test fixtures, 223 test suites, 223, 227–228 junit task (Ant), 551–552 junit.extensions package, 600 junit.framework package, 585 JUnitPerf, 263–264 decorating tests, 264, 275–276 downloading, 263 incorporating other tests with, 272 HTTPUnit, 273–274 JMeter configuration, 274–275 running combined tests, 275–278 load tests, 264, 271–272 Loop test case creating tests, 264–268 running, 269–271 test data, 268 nesting tests, 272 timed tests, 264 junitreport task (Ant), 552–553 junitSample project buildfile, 229–230 reports detailed report, 230–231 publishing to Web sites, 232 summary report, 230 test target, 229–230
JaVa
   
Comments