Unit Testing


To test the Contact List application:

  1. Download and install the free implementation of the Jabber Server from the following URL:

    http://www.jabberstudio.org/projects/ejabberd/releases/view.php?id=610

  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 by executing the following command at the command prompt:

     set classpath=%classpath%;D:\j2sdk1.4.0_02\lib; 
  4. Copy the UserLogin.java, ContactList.java, UserInfo.java, AddUser.java, EditDelete.java, DynamicTree.java, ChatWindow.java, and SocketClass.java files to a folder on your computer. Use the cd command at 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, as shown:

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

     java ContactList 
  6. The Login window of the Contact List application appears. Enter the login information, as shown in Figure 7-9:

    this figure shows the login information specified by an end user to login to the contact list application.
    Figure 7-9: Specifying Login Information

  7. Click the Submit button to send the login information to the Jabber Server for registered end users or open a new account in the Jabber server for unregistered end users.

  8. The user interface of the Contact List application appears. Select File->Add User to add other end users to the contact list and send a welcome message to the added end users.

  9. Enter the User ID, User Name, and a welcome text message to display to the new end users added to the contact list, as shown in Figure 7-10:

    click to expand: this figure shows the information specified by an end user to add new end users to the contact list.
    Figure 7-10: Adding an End User

  10. Click the Add button to add the specified end user to the contact list and send the welcome text message to the added end user, as shown in Figure 7-11:

    this figure shows the updated contact list.
    Figure 7-11: Updated Contact List

  11. Select File->Manage User to manage the contact list.

  12. Select any end user name from the tree structure of the of the contact list. The user information of the selected end user appears, as shown in Figure 7-12:

    click to expand: this figure shows end user information to edit or delete.
    Figure 7-12: Managing a Contact

  13. Modify the information and click the Update button. The information gets updated, as shown in Figure 7-13:

    click to expand: this figure shows the contact list showing the updated information specified by an end user.
    Figure 7-13: Updated Information in the Contact List




Developing Applications Using Jabber
Developing Applications Using Jabber
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 68

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