QSelect->Open();
if (!QSelect->IsEmpty())
{
Form3->SG1->Cells[0][i]=QSelect->FieldByName("Tema_text")->AsString;
Form3->SG1->Cells[1][i]=Form3->QOtchet->FieldByName("Date")->AsString;
Form3->SG1->Cells[2][i]=Form3->QOtchet->FieldByName("Time")->AsString;
Form3->SG1->RowCount=i+1;
i++;
Form3->QOtchet->Next();
}
else
{
Form3->SG1->Cells[0][1]="";
Form3->SG1->Cells[1][1]="";
Form3->SG1->Cells[2][1]="";
}
delete QSelect;
}
}
ball=0;
prav=0;
prav_user=0;
}
CheckBox1->Checked=false;
CheckBox2->Checked=false;
CheckBox3->Checked=false;
CheckBox4->Checked=false;
//делаем черный цвет шрифта у всех ответов
CheckBox1->Font->Color = clWindowText;
CheckBox2->Font->Color = clWindowText;
CheckBox3->Font->Color = clWindowText;
CheckBox4->Font->Color = clWindowText;
Pie1->Visible=false;
Timer1->Enabled=false;
}
//---------------------------------------------------------------------------
//второй таймер
void __fastcall TForm1::Timer2Timer(TObject *Sender)
{
Pie1->Angles->EndAngle=Pie1->Angles->EndAngle+2;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Pie1->Visible=false;
}
Форма "Результаты тестирования"
//щелчок мыши на таблице "Пользователь"
void __fastcall TForm3::DBGrid1CellClick(TColumn *Column)
{
QOtchet->Close();
QOtchet->SQL->Clear();
QOtchet->SQL->Add("Select * from Otchet where User_ID= "+Form2->QUsers1->FieldByName("User_ID")->AsString+ "and Tema_ID= "+Form2->QTema->FieldByName("Tema_ID")->AsString+ "Order by Date, Time");
QOtchet->Open();
if(!QOtchet->IsEmpty())
{
if (QOtchet->FieldByName("Res_text")->AsString=="Тест не пройден")
{
Label3->Font->Color= clRed;
Label4->Font->Color= clRed;
Label7->Font->Color= clRed;
}
else
{
Label3->Font->Color= clGreen;
Label4->Font->Color= clGreen;
Label7->Font->Color= clGreen;
}
Label7->Caption=Form3->QOtchet->FieldByName("Date")->AsString;
Label3->Caption=QOtchet->FieldByName("Res_text")->AsString+"!";
Label4->Caption="Набрано "+FloatToStr(QOtchet->FieldByName("Ball")->AsFloat)+" баллов";
}
else
{
Label3->Font->Color= clWindowText;
Label4->Font->Color= clWindowText;
Label3->Caption="Тестирование не производилось!";
Label4->Caption="Тестирование не производилось!";
Label7->Caption="";
}
SG1->RowCount=2;
SG1->FixedRows=1;
SG1->Cells[0][0]="Тема";
SG1->Cells[1][0]="Дата";
SG1->Cells[2][0]="Время";
SG1->Cells[0][1]="";
SG1->Cells[1][1]="";
SG1->Cells[2][1]="";
QOtchet->Close();
QOtchet->SQL->Clear();
QOtchet->SQL->Add("Select * from Otchet where User_ID= "+Form2->QUsers1->FieldByName("User_ID")->AsString+ "Order by Date, Time");
QOtchet->Open();
QOtchet->First();
if (!QOtchet->IsEmpty())
{
int i=1;
while (!QOtchet->Eof)
{
TADOQuery *QSelect=new TADOQuery(NULL);
QSelect->ConnectionString=Form2->ADOConnection1->ConnectionString;
QSelect->SQL->Add("Select * from Tema where Tema_ID= "+QOtchet->FieldByName("Tema_ID")->AsString);
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- {
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- //---------------------------------------------------------------------------
- //---------------------------------------------------------------------------
- //---------------------------------------------------------------------------
- //---------------------------------------------------------------------------
- Form3->Show();
- Form3->QOtchet->Close();
- Form3->QOtchet->SQL->Clear();
- Form3->QOtchet->Open();
- Form3->QOtchet->Open();
- Form3->QOtchet->Open();
- Form3->Label3->Font->Color= clRed;
- Form3->Label4->Font->Color= clRed;
- Form3->Label7->Font->Color= clRed;
- else
- else
- else
- else
- else
- else
- else
- Form3->Label3->Font->Color= clGreen;
- Form3->Label4->Font->Color= clGreen;
- //------------------------заполняем таблицу с темами, датой и временем на форме "Результат"
- Form3->QOtchet->SQL->Add("Select * from Otchet where User_ID= "+Form2->QUsers1->FieldByName("User_ID")->AsString+ "and Tema_ID= "+Form2->QTema->FieldByName("Tema_ID")->AsString+ "order by Date, Time");
- Form3->SG1->RowCount=2;
- Form3->SG1->FixedRows=1;
- Form3->SG1->Cells[0][0]="Тема";
- Form3->SG1->Cells[1][0]="Дата";
- Form3->SG1->Cells[2][0]="Время";
- Form3->SG1->Cells[0][1]="";
- Form3->SG1->Cells[1][1]="";
- Form3->SG1->Cells[2][1]="";
- Form3->SG1->Cells[0][1]="";
- Form3->SG1->Cells[1][1]="";
- Form3->QOtchet->SQL->Clear();
- Form3->QOtchet->SQL->Add("Select * from Otchet where User_ID= "+Form2->QUsers1->FieldByName("User_ID")->AsString+ "order by Date, Time");
- Form3->QOtchet->First();
- int i=1;
- TADOQuery *QSelect=new TADOQuery(NULL);
- TADOQuery *QSelect=new TADOQuery(NULL);
- TADOQuery *QSel=new TADOQuery(NULL);
- QSelect->ConnectionString=Form2->ADOConnection1->ConnectionString;
- QSelect->ConnectionString=Form2->ADOConnection1->ConnectionString;
- QSel->ConnectionString=Form2->ADOConnection1->ConnectionString;
- QDel->ConnectionString=Form2->ADOConnection1->ConnectionString;
- QSelect->SQL->Add("Select * from Tema where Tema_ID= "+Form3->QOtchet->FieldByName("Tema_ID")->AsString);
- QSelect->Open();
- QSelect->Open();
- if (!QSelect->IsEmpty())
- Form3->SG1->Cells[0][i]=QSelect->FieldByName("Tema_text")->AsString;
- Form3->SG1->Cells[1][i]=Form3->QOtchet->FieldByName("Date")->AsString;
- Form3->SG1->Cells[2][i]=Form3->QOtchet->FieldByName("Time")->AsString;
- Form3->SG1->RowCount=i+1;
- i++;
- delete QSelect;
- delete QSelect;
- TADOQuery *QDel=new TADOQuery(NULL);
- QSel->SQL->Add("Select * from Otchet");
- QSel->Open();
- QSel->First();
- QDel->SQL->Add("Select * from Users where User_ID= "+QSel->FieldByName("User_ID")->AsString);
- QDel->Open();
- if (QDel->IsEmpty())
- QSel->Delete();
- QSel->Next();
- Pie1->Visible=false;
- prav=0;
- CheckBox1->Font->Color = clWindowText;
- CheckBox2->Font->Color = clWindowText;
- CheckBox3->Font->Color = clWindowText;
- //закрытие формы
- Form1->Hide();
- Анализ системы автоматизации тестирования
- 1.2.3 Система тестирования «indigo»
- 4.2.Система тестирования
- Правила тестирования пользовательского интерфейса (взаимодействия программы с пользователем)
- 5.5. Тестирование графического интерфейса пользователя
- Тестирование программных систем
- 4.2.Система тестирования
- Тестирование системы
- Обзор системы тестирования Indigo.