Unit Testing


To test the Form Validation application:

  1. Download the free implementation of the Speech Converter API from the following URL:

     http://freetts.sourceforge.net/docs/index.php 
  2. Set the path of the bin directory of J2SDK by executing the following command at the command prompt:

     set path=%path%;D:\j2sdk1.4.0_02\bin; 
  3. Set the classpath of the lib directory of J2SDK and the Speech Converter API by executing the following command at the command prompt:

     set classpath = %classpath%;d:\j2sdk1.4.0_02\lib;C:\j2sdk1.4.0_02\lib; c:\freetts-bin-1_2_beta\lib\freetts.jar;c:\freetts-bin-1_2_beta\lib\cmulex.jar; c:\freetts-bin-1_2_beta\lib\jsapi.jar; 
  4. Copy the FormValidation.java and SpeakFormValidation.java files to a folder on your computer. Use the cd command on the command prompt to move to the folder in which you have copied the Java files. Compile the files by using the following javac command:

     javac *.java 
  5. To run the Form Validation application, specify the following command at the command prompt:

     java FormValidation 
  6. The User Application Form for the Form Validation application appears. Fill the fields of the form.

  7. Click the Save button to check the validity of the information provided in the user information form. If the information specified by an end user is invalid, the Form Validation application converts the validation error text to speech, which is audible with the help of speakers .

Note  

If the information specified by an end user is valid, the Form Validation application reads out the confirmation message, All entries in this form are valid.




Java InstantCode. Developing Applications using Java Speech API
Java InstantCode. Developing Applications using Java Speech API
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 46

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net