Compile function Test_QA_Services(@Test)
#pragma precomp SRP_PreCompiler

$Insert LOGICAL

Declare function Qa_Services
Declare subroutine Qa_Services

// TODO: Code to run before each test goes here
RDSKey = 255871
WaferNo = 1

GotoTest

// TODO: Code to run after each test goes here

Return TestResult or 1

//-----------------------------------------------------------------------------
// TESTS
//-----------------------------------------------------------------------------


Test IndWaferDataImport

    For TestNo = 1 to 1000
        SODWaferArray = ''
        SODWaferArray = Qa_Services('GetSODPerWafer', RDSKey)
        Assert SODWaferArray NE ''
    next TestNo

End Test


Test CompleteDataImport
    
    For TestNo = 1 to 2
        SODWaferArray = ''
        SODWaferArray = Qa_Services('GetSODPerWafer', RDSKey)
        Assert SODWaferArray NE ''
      
        WaferNos = SODWaferArray<1>
        For each WaferNo in WaferNos using @VM
            If WaferNo NE '' then
                WaferPDF = ''
                WaferPDF = Qa_Services('PostWaferImageRequest', RDSKey, WaferNo)
            end
        Next WaferNo
    next TestNo
    
end test


Test WaferImageImport
    
    For TestNo = 1 to 20
        WaferPDF = ''
        WaferPDF = Qa_Services('PostWaferImageRequest', RDSKey, WaferNo)
        Assert WaferPDF NE ''
    Next TestNo
    
end test



