FORM MODULE - People



AUTOMATION OF WEB-FORM CREATION

by

KINNERA ANGADI

B.E., Osmania University, Hyderabad, India, 2004

A REPORT

submitted in partial fulfillment of the requirements for the degree

MASTER OF SCIENCE

Department of Computing and Information Sciences

College of Engineering

KANSAS STATE UNIVERSITY

Manhattan, Kansas

2006

Approved by:

Major Professor

Dr. Daniel Andresen

ABSTRACT

The aim of this report is to create any web form dynamically using a web interface. This interface is used to automate form creation by taking input from the user about the form the user is desired to create. The input can be in terms of the type of question, order of the question, question text, option text of the question, required fields of the form, data type of the question etc. The input is stored and a web form is created dynamically based on the input. This project is developed using with C# and Oracle 10g.

This project was developed because of the requirement of creation of a new web form for various purposes by various departments on a daily basis. For example, the department needs a Travel Form on one day, a Leave Form on the next day, a Seminar Evaluation form on the next day and so on. All these forms have questions which could be text questions, radio button questions, check box questions, drop down list questions. And the form entries, which are the answers entered by the users who visit that form will be either e-mailed to a designated person or saved into a database or both saved into database and e-mailed. Rather than hard coding these various types of forms with little variations in the form questions and the form entries being e-mailed to a designated person or being saved into a database, we have developed a system using which can be used to create forms on few mouse clicks with no compromise on the type of questions, order of the questions and the number of questions. This form automation will also have the option to select if the form entries have to be saved into database or e-mailed to a person. Thus using this web interface a web form with all its functionalities is created dynamically in few mouse clicks.

TABLE OF CONTENTS

TABLE OF CONTENTS i

LIST OF FIGURES iii

LIST OF TABLES iv

ACKNOWLEDGEMENTS v

1. INTRODUCTION 1

1.1 FORM MODULE 1

1.2 PROBLEMS 1

1.3 OBJECTIVE 2

1.4 INTENDED AUDIENCE 2

1.5 OVERALL STRUCTURE 2

2. RELATED WORK 3

2.1 OTHER APPROACHES 3

2.2 COMPARISON WITH OTHER ONLINE WEB FORMS 3

3. IMPLEMENTATION 5

3.1 SYSTEM ARCHITECTURE 5

3.2 TECNOLOGIES USED 6

3.3 DATABASE SCHEMA 8

3.4 MODULES 12

3.5 FLOW CONTROL 13

3.5.1 USER FLOW CONTROL 14

3.6 DESIGN 15

3.7 SCREEN SHOTS 21

4. TESTING 28

4.1 ANTS LOAD 28

4.2 ANAYLSIS 29

4.2.1 RESULTS 32

4.3 MATC 33

4.4 ANALYSIS 33

4.4.1 RESULTS 37

4.5 HARNESSIT – UNIT TESTING 37

4.5.1 CORRECTNESS 40

4.6 PROBLEMS FACED 41

4.7 LESSONS LEARNT 42

5. FUTURE WORK 43

5.1 EXTENSIONS 43

6. CONCLUSION 44

REFERENCES AND/OR BIBLIOGRAPHY 45

APPENDIX A 46

LIST OF FIGURES

Figure 1 – SYSTEM ARCHITECTURE 5

Figure 2 – PORTAL_FORMS_TABLE 9

Figure 3 – PORTAL_FORM_DEFINITION 9

Figure 4 – PORTAL_FORMMODULE 10

Figure 5 – PORTAL_FORM_ENTRY 10

Figure 6 – DATABASE SCHEMA 11

Figure 7 – USER FLOW CONTROL 14

Figure 8 – ADMIN/USER SIDE USE CASE DIAGRAM 15

Figure 9 – CLASS DIAGRAM 16

Figure 10 - ADMIN/USER SEQUENCE DIAGRAM 17

Figure 11 – ACTIVITY DIAGRAM FOR CREATION OF A NEW FORM 18

Figure 12 – ACTIVITY DIAGRAM FOR ADDING FORM TO MODULE 20

Figure 13 – FORM INFORMATION 21

Figure 14 – SELECT QUESTION TYPE 21

Figure 15 – ADD QUESTION 22

Figure 16 – END QUESTION 22

Figure 17 – ADD OPTIONS 22

Figure 18 – EDIT OPTIONS 23

Figure 19 – FORM PREVIEW 23

Figure 20 – ADD FORM TO A MODULE 25

Figure 21 – FORM PAGE 26

Figure 22 – VIEW ENTRIES BUTTONS 26

Figure 23 – ENTRIES 27

Figure 24 – RESULTS 29

Figure 25 – TIME TO CONNECT 30

Figure 26 – TIME TO GET FIRST BYTE 31

Figure 27 – TIME TO GET LAST BYTE 31

Figure 28 – DATA GRAPH & DISTRIBUTION GRAPH 32

Figure 29 – ERROR COUNTS 34

Figure 30 – SUMMARY 34

Figure 31 – RESPONSE CODES 35

Figure 32 – GRAPH 1 – VIEW STATE ENABLED 35

LIST OF TABLES

Table 1 – TEST REULTS 38

Table 2 – TEST CASES RESULTS 39

Table 3 – TEST CASES 40

ACKNOWLEDGEMENTS

I would like to give my special acknowledgements to my major professor, Dr. Daniel Andresen, for his valuable guidance and encouragement throughout this project.

I would also like to thank Dr. Scott Deloach and Dr. Gurdip Singh for serving on my committee and for their valuable suggestions.

I would like to give my word of thanks to Neal Wollenberg and Gamage Dissanayake who have given me a chance to do this module for the Department of Communications and also have guided me through out the project.

I would finally like to thank my husband Shravan Manda for supporting me through all my difficult times and for his confidence in me.

1. INTRODUCTION

1.1 FORM MODULE

This form module is a web interface which is used to automate web form creation by taking input from the user about the web form the user is desired to create and creates the form in few mouse clicks according to the input given to the form. The input taken from the user will be in terms of the type of question, display order of the question, question text, option text of the question (for questions with options), data type of the answer (date, number, character). This input is stored into the database and the form is created dynamically in much less time and in most efficient manner.

1.2 PROBLEMS

This project was developed because of the requirement of creation of a new web form for various purposes by various departments on a daily basis. For example, the Communications department needs a Travel Form on one day, a Leave Form on the next day, a Seminar Evaluation form on the next day and so on, while Computers department needs a Survey Form, a Peer Evaluation Form, a Faculty Evaluation Form and so on. All these forms have questions which could be text questions, radio button questions, check box questions and drop down list questions. And the form entries will be either e-mailed to a designated person or saved into a database or both. Rather than hard coding these various types of forms with little variations in the form questions and the variation in the form entries being e-mailed to a designated person or being saved into a database, I have developed an interface using which we can create web forms on few clicks with no compromise on the type of questions, order of the questions to be displayed on the web form and the number of questions. This module could be added to a desired location and could be reused.

1.3 OBJECTIVE

This project was developed using in C# and Oracle 10g as back end. This application will enable the automation of the web form creation. The main features of this form module include:

a) Creation of new web forms, which takes step wise input about the type of question, question text, order of question etc.

• Create, edit, update and delete forms.

• Create, edit, update and delete questions.

b) Adding the web form to a module, this enables the form to be added to the desired module.

• Add a form to a module, delete a form from a module, copy the form and edit this new form.

c) Reporting, this enables the user to view the form entries and also to export the form entries into an Excel sheet.

• View the form entries.

• Export the form entries to an excel sheet.

1.4 INTENDED AUDIENCE

This application can be used by any department or any company where a web form is required and the form entries are saved into a database or e-mailed to a person. This interface is a fast and an efficient way to create a web forms and hence can be efficiently used

1.5 OVERALL STRUCTURE

The rest of the paper deals with the other approaches for developing this project, this project’s implementation which includes the database schema, the technologies used, flow control and the screen shots. Then we deal with the testing tools used to test the performance of the application and finally we will see the future work that could be done to improve this web application.

2. RELATED WORK

2.1 OTHER APPROACHES

Initially when ever a web form was needed we had to program as per the need of that form and hard code the questions in a table and then create a database and had to create in such a way that the form entries had to be saved into a database. Then later may be after all that coding was done the web form would be ready for users to use it at only a particular location. But this was a time consuming process. Using this form module the web form can be created dynamically in few clicks in less than 5 to 10 minutes with ideally the same preferences that were achieved if it was hard coded which would take few days to create. This form module would be of great use to departments where the usage of online surveys forms or evaluations forms will be used more on a daily basis.

2.2 COMPARISON WITH OTHER ONLINE WEB FORMS

Automatic creation: The online web forms we see generally are hard coded by a programmer and thus the time to create the forms is more when compared to the forms created using this interface.

The dynamic creation of forms with no limitation on the number of questions, type of questions is the most important feature of this application.

No limit to the number of forms: The online applications typically have to be coded and hence the number of forms created will be less in a short span of time. Using this application any number of forms can be created by just clicking the required options in the interface and can be saved in a table.

Reusability: Most of the online web forms can be used at a single location. This form module can be used at multiple locations. The forms created using this interface can be added at multiple locations simultaneously.

Flexibility: Adding new questions, deleting new questions or editing existing questions has to be done from the code side for all the typical online applications which are hard coded while it is not a problem in this interface. There is edit mode available through out the application and thus it is more flexible.

Form entries to be both saved and e-mailed: Most of the online forms do not provide the options for the admin to both save and e-mail the entries. This interface allows users both e-mail and save the form entries. The e-mail address where the form entries are e-mailed can be changed when ever the admin wants.

Reporting: The typical online forms might store the form entries into the data base but reporting is the major issue. They might have a data grid to output the results in the form of a table. But this form module application has the option to export the results into an excel sheet. Thus it provides a good way of reporting the form entries.

Over all this form automation interface has a lot of features, all embedded in a single interface. The possibility of having all these features in a single interface for any other online web form is very rare.

3. IMPLEMENTATION

3.1 SYSTEM ARCHITECTURE

The Over all structure of the system looks as follows:

Figure 1 – SYSTEM ARCHITECTURE

[pic]

The basic architecture is shown in the figure 1. This project was developed using and C#. The user goes to the login page and have to login to create/edit any web forms. The creation of the forms and the actual implementation is done using and C#. I have used Oracle 10g as the back end. The basic control flow in the creation of the forms is explained in the following paragraphs.

The administrator or the author of the form can create the web forms. The creation of the web form involves adding the questions to the form and giving all the requirements for each question. For example, the author might want the first question of the form to be a text question (Example: Please enter you name) and he might want it to be a required field. The interface has options to select if the question is a required filed or not. He might want the next question to be an e-mail field. The author needs to select the question type as e-mail and all the validation will be done automatically at the user side. Thus all the questions can be added to the form. At every point of adding the questions a preview will be displayed at the bottom to make it easy for the authors to see how it looks on the page if the page was posted at a particular location. This preview helps the author to edit the questions incase of any changes.

All the created forms are saved at a page where the author can select the desired form and post it a particular module. The forms have the options to be copied. When a form is copied it is renamed with the same name of the original form but the word copied is appended at the last. The copied form can also be edited. This helps to reuse the form. The author can also set the option for the form entries to be e-mailed to an e-mail address or to be saved into a database.

Reporting is the major issue that involves relating the form questions to the answers entered by the users when it is posted. The form entries can be viewed by the author and also be exported to an excel sheet.

3.2 TECNOLOGIES USED

Microsoft Visual :

The Visual framework includes a unified set of objects available on server and client platforms. It is the next generation of Microsoft's Visual Studio platform. Visual provides developers with a full-service Integrated Development Environment for building Web applications, XML Web Services, desktop applications, mobile applications for the .NET framework. It supports multiple languages- Visual C#.NET, , Visual C++.NET and Visual J#.NET and provides transparent development and debugging facilities across these languages in a multi-language solution.

:

is a set of web development technologies marketed by Microsoft. Programmers can use this set of technologies to build web applications, Desktop Applications and XML web services. Its main features are described in the following paragraph.

It builds the real world applications in an easy manner. It gives a lot of flexibility to choose the language you want to program in. It supports more than 25 .Net languages.

rich output caching can increase the performance to a great extent. If caching is enabled, the page is executed once and the results of the web page are saved. This makes the results easily available to the next user who requests this page. makes it easy to call XML Web Services from the application and this allows applications to communicate the data over the Internet regardless of the programming language and OS.

[1]

Oracle 10g Enterprise Console:

It Simplifies Administration and Saves Money. In detail centralized user management is faster, easier to automate and less error-prone. It Improves Security, meaning it offers better security by preventing fragmented security administration. It enhances End User Experience, meaning Single password and Single Sign-on eliminate wasted time by users. It manages the entire Oracle environment including Database, Oracle9iAS, host, network etc. It provides Web Application Management, End-to-End Transaction Tracing, Historical performance and availability data, Enhanced Monitoring and Diagnostics for all application server components, Automatic alerts and baselines [4].

JavaScript:

JavaScript developed by Netscape is used to create dynamic web pages. It is widely used.

JavaScript can put dynamic text into a HTML page, react to events, read and write HTML elements. It could be used to validate data. On an HT

JavaScript works with HTML in the following manner.

JavaScript Page

Content of the Page

I have used JavaScript confirmation alerts at all the required locations.

3.3 DATABASE SCHEMA

The following are the database tables used for this application. There are 4 tables involved in this application.

The table PORTAL_FORM has the basic fields to keep track of any new form added to the application. It saves the author of the form, date created, title and description.

Figure 2 – PORTAL_FORMS_TABLE

[pic]

The PORTAL_FORM_DEFINITION table basically keeps track of any new form questions added to that form. It creates a unique FORMID to each form. All the inputs form the user regarding the form questions, question order, data types, required fields are stored in this table.

Figure 3 – PORTAL_FORM_DEFINITION

[pic]

The table PORTAL_FORMMODULE has information about which form is added to which module. It has a unique MODULEID that checks the module it is added to. This Module ID helps in differentiating which form is added to which module.

Figure 4 – PORTAL_FORMMODULE

[pic]

The table PORTAL_FORM_ENTRY has all the entries of the form. A form can be added to multiple modules which may have entries form multiple locations. This table saves all the entries but while viewing the entries based on the module ID the form entries of each form can be differentiated.

Figure 5 – PORTAL_FORM_ENTRY

[pic]

The Figure 6 shows the all the tables used and their referential constraints. The table PORTAL_FORMS has unique FORMID initially created when a new form is created. This FORMID is used again by the table PORTAL_FORM_DEFINITION to add questions of that form. Each question has a unique QUESTIONID which is the key in the PORTAL_FORM_DEFINITION table. The table PORTAL_FORM_ENTRY uses this QUESTIONID to relate the form entries of that question. Each entry has a unique ENTRY ID. Finally the MODULEID in the PORTAL_FORMMODULE table is the key to identify the module the form is added to. This MODULE ID is used by PORTAL_FORM_ENTRY to differentiate the entries at different modules.

Figure 6 – DATABASE SCHEMA

[pic]

3.4 MODULES

The modules involved in this application are:

a. Creation of a new web form:

This is the page where the input is taken from the creator/author of the form. Only admin or authorized person has permissions to create the form. The author will have to start creation of the form by giving an appropriate title, description to the form.

Add/Edit/delete Questions:

The next step is to create the questions of the web form. The author has to select the type of the question. The available types are Text Box question, Radio Button List question, Check Box List question, Drop down List question. If the author selects Text Box question then the question text has to be entered followed by entering the display order of the question, then the author has to select if the question is a required field and the data type of the question. Next if the author selects any other question type other than Text Box question then even the text for the options of the question have to be entered. As the author keeps adding the questions the preview of the form will available at the bottom if the page. This preview lets the author even edit/delete the questions the author already entered. This way the author has the permission to add/ edit/ delete the questions simultaneously.

b. Adding the form to that module:

All the created forms will be displayed in a grid in a different page. The desired form can be added to the module and it will be posted at the module form page. Once the form is posted on the web, this will be the page visible to the users and the users can answer the survey/questions. The entries will be saved to the database or e-mailed depending upon the settings of the author.

Add/Copy/Delete forms:

The author has permissions to copy, delete and add these forms to the module. The author can select the option to save the entries into the database and also select the option to e-mail the entries of the form to any e-mail ID.

c. Reporting the form entries:

Any web form that is posted on the web and if is answered by any user has form entries for that form and these entries are saved into the database. Only the author or authorized person has the permissions to view the results of the web form.

View by Questions Order/ View by User Order/ Export to an Excel Sheet:

The entries can be viewed either by the order of the form question numbers or by the order of the users. The entries can also be exported into an excel sheet and saved for further use.

3.5 FLOW CONTROL

3.5.1 USER FLOW CONTROL

The figure 7 shows the user control flow for the entire system. The rectangle boxes represent the source files which are .aspx pages in my project. The arrows represent the flow between the .aspx pages. The User from the Home Page goes to the Login page and then navigates to the Form page. If the user enters the edit mode, the page showing all the forms in a table will be displayed where he can click and go to Create a new form Page or Edit an existing form page. After creating or editing the form, user is taken back to the Add Form to Module page.

Figure 7 – USER FLOW CONTROL

[pic]

3.6 DESIGN

USE CASE DIAGRAMS:

The use case diagrams overview the usage requirements for a system. The use cases describe the sequence of actions that provide something of measurable value to an actor. Below is the use case diagram for my Form Module. In this use case the User/Admin has the following sequence of actions: creating the web forms, adding the web forms to the module desired or viewing the created forms.

Figure 8 – ADMIN/USER SIDE USE CASE DIAGRAM

[pic]

Admin / Author

CLASS DIAGRAM:

Class diagrams show the classes of the system, their interrelationships and the operations and attributes of the classes. Below is the class diagram for my project and this project has 3 aspx pages which form the main classes in the class diagram shown below. There is a class FormsDB which is used for the database access. The 3 aspx pages are Final Form, AddFormToModule and Create Form and their operation are shown. All the database interactions are done by FormsDB class file and the aspx pages request the FormsDB file for any database interaction. The .cs extension files are the code behind files of respective aspx pages.

Figure 9 – CLASS DIAGRAM

[pic]

SEQUENCE DIAGRAM:

Sequence diagrams model the flow of logic within the system in a visual manner, enabling us both to document and validate your logic, and are commonly used for both analysis and design purposes. Below is the Sequence Diagram for my project which shows the flow of logic within the project’s system. When the user wants to edit the forms he can click on edit and then he will be able to see the page where he can edit the form and view the edited form. To create a form he will have to send module id as a parameter to the create form page from Addformtomodule page and then he can create and view the created forms.

Figure 10 - ADMIN/USER SEQUENCE DIAGRAM

[pic]

ACTIVITY DIAGRAM FOR CREATION OF A NEW FORM

Activity diagrams are typically used for business process modeling, for modeling the logic captured by a single use case or usage scenario, or for modeling the detailed logic of a business rule.

Figure 11 – ACTIVITY DIAGRAM FOR CREATION OF A NEW FORM

[pic]

The figure 11 shows the UML Activity Diagram for the Create New Web Form use case. As you can see the first activity is to enter basic form information into the fields provided in the basic form information screen. Then a decision has been made depending upon whether the required fields like form name, description are entered. If they are entered then the screen showing the question types is displayed else the basic form information screen is displayed asking to enter the required fields. Now the activity is to select the question type which could be Text box question, radio button question, check box question and drop down question. Now again a decision is made to check if a selection is made or not. If a selection is made then the screen with the questions information will be displayed, else the screen to select the question type is displayed again. Now the activity is to enter the question information into the Question Info screen. Now a decision is made again based upon the type of question. If the question is Text Box Question then the Display End Question Screen is shown and the activity diagram is terminated else the screen with Options Info is displayed and then options information has to be entered. Now the Display End Question Screen is shown and the activity diagram is terminated.

The activity diagram looks a more structured and linear. The reason for having a linear structure was to make the interface more user friendly by not putting everything on the page at one time and not clustering the page. Since the entire creation of the form occurs in a single page, the step wise linear structure helps the users to understand the interface more clearly and also helps to know at what stage of from creation they are presently in. The idea of keeping the entire form creation in a single page was to avoid redirecting the page at every step of form creation which increases the over all delay in creating the form because the time to connect to the redirected page is variable.

The step wise creation of form does not compromise with the flexibility to change the form information. Through out the form creation process there is a form preview available to the user which enables the user to edit any form information at any instance of time.

Thus I have tried to create a linear and optimal structured interface which avoids confusion in creating forms since the form information is taken in step wise manner and also I have tried to keep minimum redirects from one page to another thus tried to save a lot of time.

ACTIVITY DIAGRAM FOR ADDING FORM TO A MODULE

The activity diagram in the figure 12 shows the activity to add a form to a module use case. The first activity is to navigate through the form we want to add from the table that displays all the forms. Next we need to select e-mail the entries option and the option to save the entries in the database. Here a decision is made depending upon whether the e-mail option is selected or not. If e-mail the entries option is not selected then Add the form to module is clicked and the activity is terminated else if the e-mail option is selected, then the textbox where the e-mail Id has to be entered is checked and again a decision is made if the e-mail id is empty. If the e-mail Id Text Box is entered with an e-mail address then Add the form to module is clicked and the activity is terminated else the textbox is shown again where the e-mail id has to be entered.

Figure 12 – ACTIVITY DIAGRAM FOR ADDING FORM TO MODULE

[pic]

3.7 SCREEN SHOTS

The figure 13 is the screen shot showing the first step of the form creation. The author of the form has to enter the form title, description of the form.

Figure 13 – FORM INFORMATION

[pic]

The figure 14 is the screen shot showing the types of questions the form contains. The author has to add each question to the form by selecting the type of question.

Figure 14 – SELECT QUESTION TYPE

[pic]

The figure 15 is the screen shot showing the fields entered while adding the question to the form. The question text has to be entered, the question order in the form has to be entered, the data type of the question has to be entered and finally if the question is a required field then the required filed option has to be selected.

Figure 15 – ADD QUESTION

[pic]

After each question is added, the end question button has to be clicked to end adding this question and start adding the next question.

Figure 16 – END QUESTION

[pic]

If the question has options for that question then the options have to be entered here.

The option text has to be entered followed by the order of the option. The preview for the options is also visible at the bottom and the options could be edited or deleted.

Figure 17 – ADD OPTIONS

[pic]

The options edit mode is shown below in figure 18. Once the option is edited, update link should be clicked to save the changes.

Figure 18 – EDIT OPTIONS

[pic]

Figure 19 – FORM PREVIEW

[pic]

The figure 19 is the screen shot showing the preview of the form `created by the author. Here again we have the option to edit/delete any question already created by the author.

Below is the interface for form creation as a full segment.

[pic]

[pic]

[pic]

[pic]

[pic]

[pic]

The figure 20 shows the page consisting of all created forms. The author has permissions to edit the form already created. He can copy the form created by another author also and then modify it to create another form. The author can also delete the form already added to a module. By clicking the Add/Update button the form will be added to the module.

Figure 20 – ADD FORM TO A MODULE

[pic]

The figure 21 is the form that is visible to the users after it is posted by the author. The users can visit the site answer the questions/survey and submit the entries.

Figure 21 – FORM PAGE

[pic]

The author can log in to see the results. The results can be viewed by clicking the view buttons below. If view by Entry button is clicked then the entries are viewed by the order of the users. If View by Question button is clicked then the entries are viewed by the order of the questions.

Figure 22 – VIEW ENTRIES BUTTONS

[pic]

The form entries can be exported to an Excel Sheet if the button Export to Excel is clicked. The Excel sheet can be saved to see the form entries.

Figure 23 – ENTRIES

[pic]

The figure 23 shows the form entries and by clicking the button Export to an excel sheet the form entries will be exported to an excel sheet.

4. TESTING

4.1 ANTS LOAD

1. Testing using ANTS Load:

ANTS Load is used to predict a web application's behavior and performance under the stress of a multiple user load. It does this by simulating multiple clients accessing a web application at the same time, and measuring what happens.

ANTS Load is for load testing websites and web services and works particularly well for applications written using Microsoft technologies such as and ASP.

Features:

It is used to build web applications using Microsoft technologies. It can quantify performance for a reasonable (>25) number of application users. It can understand the business impact of performance. It allows simulates multiple concurrent users of a web application. It measures the performance of the application in terms of page download times, server performance and errors. Finally it indicates the business impact in terms of the abandonment prediction and frustration coefficient

ANTS Load has 3 editions:

• ANTS Load Entry Level Edition lets you simulate up to 25 concurrent users, running on a single client computer.

• ANTS Load Professional Edition lets you simulate up to 100 concurrent users, running on a single client computer.

• ANTS Load Enterprise Edition lets you simulate thousands, or even tens of thousands, of concurrent users, running on multiple client computers.

I have used the free evaluation for up to 10 users here for testing my web site.

4.2 ANAYLSIS

Website performance testing tools give results that are very subjective to interpret. In a number that has been widely quoted, Nielsen reported that "if a web page takes longer than 10 seconds to download then a user is likely to lose interest”. Frustration was measured as being very slightly influenced by time but only if the download time was greater than 30 seconds. Lostness equals the number of page visits required to complete a task (optimal path) divided by the number of pages visited. 1.0 means the user was not lost at all. There is no upper limit! You can see in the below test result that the time to connect to each page was zero except for two pages. This shows that the web site will not be much frustrating to users. The page takes the maximum amount of time to connect because of the authentication, the images it has to load and the data it has to retrieve. Generally a web page consisting of images take a lot of bytes and lot of time to connect and in this application the time to connect is not too high. I have done the testing from a system connected to internet via modem and hence I can say that it would perform even better from a faster connection.

Figure 24 – RESULTS

[pic]

This section shows the overall distribution of metrics for your web application. The charts show what proportion of timings fall into which intervals.

Figure 25 – TIME TO CONNECT

[pic]

The figure 25 shows that the application is fast enough to avoid user frustration level.

The figure 26 shows the time taken for the application to get the first byte. You can see that the maximum quantity of has very less time to retrieve the first byte

Figure 26 – TIME TO GET FIRST BYTE

[pic]

The figure 27 shows the time taken for the application to get the last byte. You can see that the maximum quantity of has very less time to retrieve the last byte.

Figure 27 – TIME TO GET LAST BYTE

[pic]

This next section shows how the performance counters changed over the duration of the test. The charts on the left in figure 28 show the actual data over the course of the test while the charts on the right show the distribution. You can use the charts on the left to spot cyclical patterns in performance counters, while the charts on the right are useful for determining overall behavior [8].

Figure 28 – DATA GRAPH & DISTRIBUTION GRAPH

[pic]

[pic]

4.2.1 RESULTS

From the above analysis, I can conclude the following results:

• Typically this application will not be frustrating to the users to a great extent. However the pages consisting of images might take a little longer time than the web pages without any images on them.

• The time to connect to the web page is not too high and hence the web page will not be abandoned by the users.

• Since the time between the first byte and the last byte received is not too high when the application was tested from a dial up connection, the level of lost ness while creating the forms using this interface is very less. Typically this application should perform with less level of frustration and lost ness while creating forms form typical networks speeds.

4.3 MATC

Application Center Test is designed to stress test Web servers and analyzes performance and scalability problems with Web applications, including Active Server Pages. It simulates a large group of users by opening multiple connections to the server and rapidly sending HTTP requests. It supports several different authentication schemes and the SSL protocol, making it ideal for testing personalized and secure sites. Although long-duration and high-load stress testing is Application Center Test's main purpose, the programmable dynamic tests will also be useful for functional testing. It is compatible with all Web servers and Web applications that adhere to the HTTP protocol.

My tests:

Below are the test results when the View State of the Data Grid is enabled and its comparison when View State of the Data Grid is disabled.

View state solves a very specific problem for developers—retaining state for server-side controls that are not form elements. This is important because much of the server-side control model in is built around the assumption that all controls retain their state if the user posts back to the same page. That is, if you modify the contents of any control during the processing of a request, you can count on those modifications still being there on any subsequent POST request back to the same page.

The main form page has a single Data Grid control that binds to the results of a query against the form tables of the database. When any changes are made to this connection string and then the view state field is analyzed, it was shocking to find that it has more than the actual number of characters needed. One reason for this explosion is that view state must encode not only the data but also the type of data (metadata); also, base64 encoding generally adds about 33 percent space overhead.

4.4 ANALYSIS

Connection problems and other network problems occur due to poorly formatted URLs or other network errors. You can see that the errors in my application are zero.

Figure 29 – ERROR COUNTS

[pic]

The figure 29 shows that the application URL is formatted well. Under heavy loads, the Time to Last Byte (TTLB) value will increase, often to the point where connection time-outs may occur for slower Web applications. You can see in figure 31 the average time for the last bye.

Figure 30 – SUMMARY

[pic]

The figure 30 shows that the average time for the last byte was not too high when compared to first byte time. Hence this application is not a slow web application. Response codes should all be in the 200 range. Response codes in the 400 range indicate client errors, while numbers in the 500 range indicate server errors. 404 response codes could be due to missing content on the Web server or errors in the test requests. You can see in figure 32 the Response Codes for my application.

Figure 31 – RESPONSE CODES

[pic]

From the figure 31 it is clear that the Response Codes for this application is 200 [7].

Comparison of the performance when the data grid View State was disabled with the data grid View State Enabled is done below. Below is the graph with Requests Vs Time in seconds when the view state of the data grid displaying in enabled.

Figure 32 – GRAPH 1 – VIEW STATE ENABLED

[pic]

Figure 33 – GRAPH 2 – VIEW STATE DISABLED

[pic]

You can see that the performance increased very clearly when the view state of the data grid was disabled.

Cases:

The above 2 statements have made the performance increase drastically. One reason for this explosion is that view state must encode not only the data but also the type of data (metadata); also, base64 encoding generally adds about 33 percent space overhead. Those statements have reduced the overhead and hence the performance increases. That’s the whole use of making the ViewState Disabled.

4.4.1 RESULTS

• Correctness: From the above analysis this application does not have poorly formatted URLs and it does not have other network errors and is suitable for typical network connections from slow modem to T1 carriers since the there are no network errors.

• Since the response codes are in the range of 200 there are no client or server errors reported.

• There are no 404 errors which means that there no missing content on the Web server or errors in the test requests.

• I have tested these simultaneous connections from a modem connection and since I had the tests positive for the slowest connection I can say that for any other typical connection better than the dial-up connection there should not be a problem or errors reported.

4.5 HARNESSIT – UNIT TESTING

HarnessIt’s testing framework is entirely attribute-based which provides greater flexibility than traditional inheritance-based frameworks. The use of attributes is especially important since .NET allows only single inheritance. It is built around a pluggable test engine framework which allows testing of Windows, web, and remote applications with unparalleled functionality. It allows you to save detailed, comprehensive test results as either eXtensible Markup Language (XML) or Rich Text Format (RTF) documents. It is written in 100% managed C# code. You can use HarnessIt to run tests written in a .NET language which test COM components, legacy DLLs, and managed C++ classes.  You can, by extension, test unmanaged C++ classes via managed C++ test classes.  Detailed help about legacy testing is available in HarnessIt's documentation. HarnessIt can run unit tests built in any .NET CLR compliant language.

Table 1 – TEST REULTS

|Project: Automation of Web-Form Creation |

|____________________________________________________________ |

| |

|Test Results |

| |

|PASSED: 10 (100.0%) |

|FAILED: 0 (0.0%) |

|TOTAL: 10 |

| |

|Project Overview |

| |

|Assembly Count: 1 |

|Class Count: 5 |

|Method Count: 109 |

| |

|Test Class Count: 1 (20.0%) |

|Test Method Count: 10 (9.2%) |

| |

|Tests Performed: 10 |

| |

|Elapsed Time: 4.903 seconds. |

|Execution Time: 4.590 seconds. |

Table 2 – TEST CASES RESULTS

|Initializing test engine UnitedBinary.HarnessIt.TestEngine.Local.LocalExecutionEngine |

|Local Engine successfully initialized. |

| |

|Processing class unittesting |

|Executing test method unittesting.Testquestiontextsize() |

|Passed test 1: Question text Size |

|Method execution time: 4.355 seconds. |

|Executing test method unittesting.Testquestionorder() |

|Passed test 1: Question Order |

|Method execution time: 0.031 seconds. |

|Executing test method unittesting.Testquestiondatatype() |

|Passed test 1: Question datatype |

|Method execution time: 0.016 seconds. |

|Executing test method unittesting.Testquestionformid() |

|Passed test 1: Question Form ID |

|Method execution time: 0.016 seconds. |

|Executing test method unittesting.Testquestionrequiredfield() |

|Passed test 1: Question Required Field |

|Method execution time: 0.016 seconds. |

|Executing test method unittesting.TestDeleteOption() |

|Passed test 1: Option deleted |

|Method execution time: 0.047 seconds. |

|Executing test method unittesting.TestFormName() |

|Passed test 1: form updated |

|Method execution time: 0.063 seconds. |

|Executing test method unittesting.TestDeleteQuestion() |

|Passed test 1: Question deleted |

|Method execution time: 0.016 seconds. |

|Executing test method unittesting.Testquestiontype() |

|Passed test 1: Question type |

|Method execution time: 0.016 seconds. |

|Executing test method unittesting.Testquestiontext() |

|Passed test 1: Question text |

|Method execution time: 0.016 seconds. |

|All tests in unittesting succeeded. |

| |

|Summary: 10 tests executed, 10 passed, and 0 failed. |

|Shutting down test engine UnitedBinary.HarnessIt.TestEngine.Local.LocalExecutionEngine |

|Local Engine shutdown complete. |

Table 3 – TEST CASES

|[TestMethod("Verify Form Name" )] |

|public void TestFormName(TestMethodRecord test) |

|{ |

|test.RunTest(getfname(145,"admin","fname","fname")== 145,"formupdated"); |

|} |

|[TestMethod("Verify Option Deleted" )] |

|public void TestDeleteOption(TestMethodRecord test) |

|{ |

|test.RunTest(getoption(1664) == 1,"Option deleted"); |

|} |

|[TestMethod("Verify Question Type" )] |

|public void Testquestiontype(TestMethodRecord test) |

|{ |

|test.RunTest(getquestiontype(1661) == "TQ","Quest.type"); |

|} |

4.5.1 CORRECTNESS

An application can be tested by running infinite number of test cases to check for its correctness. But practically we have to restrict our self to few test cases which can assure that the application will run perfectly under ideal situations. For this application I have tested using 10 test cases which were successfully executed. You can see in table 3 some of the test cases used to test this application.

4.6 PROBLEMS FACED

While I was building this application, I had a restriction in the number of questions the web forms created using this interface would have and I restricted it to 20. But I have realized that the whole concept of dynamic behavior would be lost if there was a limitation to the number of questions. Later I extended it to work for any number of questions.

In this application there is a data grid embedded inside another data grid, in such situations it was difficult to bind data to the inner data grid.

To export the form entries into an excel sheet I had to export the data from a data grid to an excel sheet rather than a table. It was little difficult to write the code to export the data to an excel sheet.

4.7 LESSONS LEARNT

I have learnt to properly use the data grid item templates, all their properties, how to embed edit update cancel hyperlink columns into the data grid, how to dynamically bind text to data grid.

I have learnt the importance of user controls in and how they can be re used. The user controls can be drag dropped into an .aspx page and they could be used.

I have learnt the usage of Object oriented concepts in .

I have learnt to export results form a data grid to an excel sheet by writing function that would automatically convert the data from a data grid into a excel sheet.

I have learnt auto e-mail generation and have learnt to format the e-mail that would be auto generated.

I have learnt to validate the forms perfectly. The validation on the client side is done well in this application. I have learnt the usage of Regular expressions in .

I have learnt to create stored procedures and packages. I have learnt the usage of input output parameters used in the tables. I have also learnt nested queries, usage of sequence and triggers.

I have learnt the testing tools ANTS Load (version 1.7) and Microsoft Application test Center, which I have used to test this application.

5. FUTURE WORK

5.1 EXTENSIONS

This application creates web forms that have Text questions, Radio Button questions, Check Box, questions, Drop down questions. There is one type of tabular question which this application does not create. Some surveys have questions that are tabular in structure with horizontal and vertical columns in the same question. Such type of questions can be added to this application. Because of the dynamic nature of the entire application it was little difficult to create such tabular questions. The questions entered at the admin side and answers entered at the user end have to be related in the database. But using a tabular structure for a question made relating questions to answers in a dynamic binding was a little difficult.

6. CONCLUSION

This form module application creates all types of questions any typical web form would have. It has Text questions, Radio Button questions, Check Box, questions, Drop down questions. It does not even restrict the number of questions the form can have. It supports all data types including character, date, number, e-mail. It has support for keeping a question as a required field which most of the web forms need. The proper validation is done at the user end. Validation is considered as a crucial element in these web forms which is handled well in this application. The reporting is also done with both the options to view the entries by the order of the questions or by the order of the user entry. There is also option to export the entries to an excel sheet. Over all this application can be used effectively in many departments to create web forms in few minutes with all the advantages mentioned above and also to view the form entries in the most efficient way.

REFERENCES AND/OR BIBLIOGRAPHY

[1] “Start Vb dot ”, “ Features”,

[2] Red-Gate, “Load testing, stress testing”,



[3] Shrijeet Nair, “Microsoft Application Test Center”, “Date: 9-17-2002”17/2002



[4] Oracle, “Oracle Database and Grids”,



[5]W3Schools, “ Introduction”,

[6] Microsoft , “ web: Official Microsoft 2 site”,



[7] Microsoft, “Visual Studio Extensibility”,



[8] Red-Gate, “Website download time, abandonment”,



APPENDIX A

USER MANUAL

Administrator:

The administrator/user can add a form module to the page. The Edit mode will redirect to a page where all the created forms will be displayed in a grid from which he can select the form or create his own form by clicking the Create New Form link.

1. Create a new form:

Creating a form has the following steps all in a single web page.

Step1. Form Information:

The fields Title, name, Description defines the form and have to be entered. Click Save and continue to add questions (items) to the form.

Step2. Add Form Items/Questions:

There are 4 possible types of questions you can add to a form. They are:

a) Text Question

b) Option Button List

c) Check Box List

d) Dropdown List.

Select the type of the item/question you want to add. Click “Next” Button.

Step3. Add/Edit Item/Question:

If your selection in step 2 is ‘Text Question’

• Enter a text for the question in the textbox provided.

• (Optional) Enter the order of the question it has to be displayed in the form you are creating. By default it is set to 1.

• Select the data type of the answer field for this question.

Available data types are:

a) Number

b) Character.

c) Date

• (Optional) Select the maximum number of characters you need to provide for this answer field.

• Click “Add/Update” button.

Click “End Question Edit” button to finish entering current question and add the next item/question of the form. You will be taken to the step 2.

If you have selected any option other than ‘Text Question’ in Step 2 then, continue to step 4.

Step4. Add/Edit Option Questions:

• Enter the option for the question in the textbox provided.

• (Optional) Enter the order of the option it has to be displayed in the form you are creating. By default it is set to 1.

• Click “Add Option” button.

While you keep adding options they are displayed below in the Current Options.

Edit options:

• You can click “Delete” link to delete the option

• To edit click the corresponding “Edit” link option.

• If you have changed the option by clicking edit, then click “Update” to save the changes or click “Cancel” if you want to cancel the edit mode.

• Click “End Question Edit” button if you have finished entering current item/question. You will be taken to step 2 to continue adding items/questions.

Step5. Form Preview:

While you keep adding items/questions the form is previewed underneath.

In the Form Preview area you can click corresponding “Edit” link to edit or delete any item/question.

• The question will be displayed in the Add/Edit Question field. You can edit the question and then click “Add/Update” button.

• If it is an option type question, the options will be in Current Options list under Add/Edit Options and you can edit options similar to the procedure explained in Step 4 Edit Options.

2. Add a form instance to a module:

In the Edit Form Modules page, all the existing forms will be displayed. User can use one of those forms or create his own form.

If you are using an existing form:

• Navigate to the form you want to add, to the module from the table below.

• Check the option(s) for the form entries to be either e-mailed to a designated person, saved into the database, or both. Enter the e-mail address where the form entries have to be e-mailed.

• Click the corresponding Add/Update button to add that form to the module. Once a form is added to the module it will be displayed on the first man page.

• You can delete the form from you module. If you do so, your data entries will be lost.

• Using copy function you can create a replica of an existing form and modify it the way you want.

3. Reporting:

You can view data in the main page in the following ways. If you have the edit rights to the form you will see two buttons at the bottom of the page labeled as:

. View by Entry

. View by question

View by Entry: This button will display the entries of the form based on entries.

If you need to export the data displayed to an excel file then click the button “Export to Excel”.

View by Question: This button will display the entries of the form based on question numbers.

-----------------------

View Created Form

Add the form to the module

Create a web form

FormPage

_Click ()

Edit_Click ()

Edit/Delete/Update Existing Form (.aspx page)

Create New Form

(.aspx page)

Add Form to Module Page (.aspx page)

Form Page

(.aspx page)

Admin Login Page

(.aspx page)

Home Page

(.aspx page)

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download