00001
00002
00003 #ifndef QA_H
00004 #define QA_H
00005
00006 #ifndef HTMLPAGE_H
00007 #include "htmlPage.h"
00008 #endif
00009
00010 char *qaStringBetween(char *text, char *startPattern, char *endPattern);
00011
00012
00013
00014
00015 char *qaScanForErrorMessage(char *text);
00016
00017
00018
00019 int qaCountBetween(char *s, char *startPattern, char *endPattern,
00020 char *midPattern);
00021
00022 struct slName *qaRandomSample(char *db, char *table, char *field, int count);
00023
00024
00025
00026 struct qaStatus
00027
00028 {
00029 struct qaStatus *next;
00030 int milliTime;
00031 char *errMessage;
00032 boolean hardError;
00033 };
00034
00035 struct qaStatus *qaPageGet(char *url, struct htmlPage **retPage);
00036
00037
00038 struct qaStatus *qaPageFromForm(struct htmlPage *origPage, struct htmlForm *form,
00039 char *buttonName, char *buttonVal, struct htmlPage **retPage);
00040
00041
00042 void qaStatusSoftError(struct qaStatus *qs, char *format, ...);
00043
00044
00045 void qaStatusReportOne(FILE *f, struct qaStatus *qs, char *format, ...);
00046
00047
00048 struct qaStatistics
00049
00050 {
00051 struct qaStatistics *next;
00052 int testCount;
00053 int softCount;
00054 int hardCount;
00055 long milliTotal;
00056 };
00057
00058 void qaStatisticsAdd(struct qaStatistics *stats, struct qaStatus *qs);
00059
00060
00061 void qaStatisticsReport(struct qaStatistics *stats, char *label, FILE *f);
00062
00063
00064 #endif
00065