Ignore:
Timestamp:
07/05/11 13:04:29 (13 years ago)
Author:
sherbold
Message:

+ added test verdict pass/fail, including error message and the number of the message in the session at which the verdict was set
+ added result file; location is a parameter when calling the application
+ added test arbiter: if the target of a message cannot be determined correctly, the session fails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MFCtooling/replay/replay.cpp

    r104 r105  
    1212        if (argc<3)  
    1313        { 
    14                 std::wcout << "Usage: " << argv[0] << "<replayfile> <applicationundertest>" << std::endl; 
     14                std::wcout << "Usage: " << argv[0] << "<replayfile> <applicationundertest> [<resultfile>]" << std::endl; 
    1515                return 0; 
    1616        } 
    17  
    18         // execute application to be replayed 
    19         /*if (argc>2) { 
    20                 std::wcout << "executing " << argv[2] << std::endl; 
    21                 PROCESS_INFORMATION pi; 
    22                 STARTUPINFO si; 
    23                 ZeroMemory(&pi, sizeof(pi)); 
    24                 ZeroMemory(&si, sizeof(si)); 
    25                 CreateProcess(NULL, argv[2], NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); 
    26                 Sleep(10000); 
    27         }*/ 
    28  
    2917 
    3018        // initialize COM library for the current thread 
     
    4129 
    4230        if( !FAILED(hr) ) { 
     31                TestResults results(argv[1]); 
    4332                std::wcout << L"replaying sessions in " << argv[1] << std::endl; 
    44                 LogParser * parser = new LogParser(argv[2], 5000, true); 
     33                LogParser * parser = new LogParser(argv[2], 5000, &results, true); 
    4534                pXMLReader->putContentHandler(parser); 
    4635                hr = pXMLReader->parseURL(argv[1]); 
     
    4837                std::wcout << L"================================================" << std::endl; 
    4938                std::wcout << L"replay completed" << std::endl; 
     39                if( argc>=4 ) { 
     40                        results.write(argv[3]); 
     41                        std::wcout << L"results written to " << argv[3] << std::endl; 
     42                } 
    5043        } 
    5144 
Note: See TracChangeset for help on using the changeset viewer.