def test_getTags(self): orchestrator = TBTAFOrchestrator() testBed = orchestrator.createTestBed() testSuite1 = orchestrator.createTestSuite("C:\\Users\\frgutier\\OneDrive\\Maestria MCC\\Pruebas de Software y Calidad Gerardo Padilla\\Proyecto Final\\GIT Repo\\TBTAF\\tbtaf\\test\\discoverer\\samples") testSuite2 = orchestrator.createTestSuite("C:\\Users\\frgutier\\OneDrive\\Maestria MCC\\Pruebas de Software y Calidad Gerardo Padilla\\Proyecto Final\\GIT Repo\\TBTAF\\tbtaf\\test\\discoverer\\samples", ["TBTAF"]) testSuite3 = orchestrator.createTestSuite("C:\\Users\\frgutier\\OneDrive\\Maestria MCC\\Pruebas de Software y Calidad Gerardo Padilla\\Proyecto Final\\GIT Repo\\TBTAF\\tbtaf\\test\\discoverer\\samples", ["Dummy"]) #1 project1 = orchestrator.createNewProject(testSuite1, testBed, 'Prueba1') ltest1 = ['TBTAF', 'Discoverer', 'Textbook'] self.assertTrue(set(ltest1) == set(orchestrator.getTags('Prueba1'))) #2 project2 = orchestrator.createNewProject(testSuite2, testBed, 'Prueba2') ltest2 = ['TBTAF', 'Textbook', 'Discoverer'] self.assertTrue(set(ltest2) == set(orchestrator.getTags('Prueba2'))) #3 project3 = orchestrator.createNewProject(testSuite3, testBed, 'Prueba3') ltest3 = [] self.assertTrue(ltest3 == orchestrator.getTags('Prueba3'))
''' Created on 25/11/2015 @author: S41nz ''' from orchestrator.TBTAFOrchestrator import TBTAFOrchestrator if __name__ == '__main__': testScript = "D:\\tbtaf\\tbtaf\\test\\test03.tbtaf" print "Welcome to TBTAF Test bed" myTBTAF = TBTAFOrchestrator() print "Executing the following test script: " + testScript parseResult = myTBTAF.parseScript(testScript) print "Parse Status: "+parseResult.status print "Parse Message"+parseResult.message
def test_getTests(self): orchestrator = TBTAFOrchestrator() testBed = orchestrator.createTestBed() testSuite1 = orchestrator.createTestSuite("C:\\Users\\frgutier\\OneDrive\\Maestria MCC\\Pruebas de Software y Calidad Gerardo Padilla\\Proyecto Final\\GIT Repo\\TBTAF\\tbtaf\\test\\discoverer\\samples") testSuite2 = orchestrator.createTestSuite("C:\\Users\\frgutier\\OneDrive\\Maestria MCC\\Pruebas de Software y Calidad Gerardo Padilla\\Proyecto Final\\GIT Repo\\TBTAF\\tbtaf\\test\\discoverer\\samples", ["TBTAF"]) testSuite3 = orchestrator.createTestSuite("C:\\Users\\frgutier\\OneDrive\\Maestria MCC\\Pruebas de Software y Calidad Gerardo Padilla\\Proyecto Final\\GIT Repo\\TBTAF\\tbtaf\\test\\discoverer\\samples", ["Dummy"]) #1 project1 = orchestrator.createNewProject(testSuite1, testBed, 'Prueba1') dtest1 = {'TBTAF': [2021],'Textbook':[2021],'Discoverer':[2021]} self.assertTrue(dtest1 == orchestrator.getTests('Prueba1')) #2 project2 = orchestrator.createNewProject(testSuite2, testBed, 'Prueba2') dtest2 = {'TBTAF': [2021],'Textbook':[2021],'Discoverer':[2021]} dtest3 = {'TBTAF': [],'Textbook':[],'Discoverer':[]} self.assertTrue(dtest2 == orchestrator.getTests('Prueba2', ["TBTAF"])) self.assertTrue(dtest2 == orchestrator.getTests('Prueba2', ["TBTAF"], TBTAFFilterType.IN)) self.assertTrue(dtest2 == orchestrator.getTests('Prueba2', ["TBTAF", "Discoverer", "Dummy"], TBTAFFilterType.IN)) self.assertTrue(dtest2 == orchestrator.getTests('Prueba2', ["Dummy"], TBTAFFilterType.OUT)) self.assertTrue(dtest3 == orchestrator.getTests('Prueba2', ["Textbook"], TBTAFFilterType.OUT)) #3 project3 = orchestrator.createNewProject(testSuite3, testBed, 'Prueba3') dtest4 = {} self.assertTrue(dtest4 == orchestrator.getTests('Prueba3')) self.assertTrue(dtest4 == orchestrator.getTests('Prueba3', ["TBTAF"]))