Commit af437eee authored by berge's avatar berge
Browse files

Changed testcase structure

parent 1a32836c
Loading
Loading
Loading
Loading
+79 −3
Original line number Original line Diff line number Diff line
@@ -34,6 +34,80 @@
        }	
        }	
    }
    }


	group upperTesterFunctions {
	    
	    function f_waitForManualVerdict() runs on MRTD {
	        
	    	action("Please report IS results using provided interface.");
	    	
	    	t_wait.start;	    	
	    	alt {
	    	    [] a_isReports();
	    	    
	    	    [] t_wait.timeout {
	    	     	// do nothing   
	    	    }
	    	}    	        
	    } // end f_waitForManualVerdict
	    
	} // end upperTesterFunctions
	
		group verdictFunctions {
	    
		function f_establishVerdict(
			in charstring p_testcaseId,
			in template IsVerdictList p_expectedFailResults,
			in template IsVerdictList p_expectedPassResults
		) runs on MRTD {
        	
        	if(not(PXT_AUTOMATIC_TEST_INTERFACE)) {
        	 	f_waitForManualVerdict();   
        	}
        	        	
        	// Basic Access Control
			if(vc_simu.securityStatus >= e_basicAccessControl 
        		and not(match(vc_simu.isFailVerdicts, superset(enum2int(e_aisBacAuthentication))))) {
        		f_pushPassResult(enum2int(e_aisBacAuthentication));
        	} 
        	
        	// Passive Authentication
        	if(not(match(vc_simu.isFailVerdicts, superset(enum2int(e_aisPassiveAuthentication))))) {
        		f_pushPassResult(enum2int(e_aisPassiveAuthentication));
        	} 
        	
        	// Active Authentication
        	if(vc_simu.activeAuthenticationPerformed 
        		and not(match(vc_simu.isFailVerdicts, superset(enum2int(e_aisActiveAuthentication))))) {
        		f_pushPassResult(enum2int(e_aisActiveAuthentication));
        	} 

			// Terminal Authentication
			if(vc_simu.securityStatus >= e_chipAuthenticated 
        		and not(match(vc_simu.isFailVerdicts, superset(enum2int(e_aisChipAuthentication))))) {
        		f_pushPassResult(enum2int(e_aisChipAuthentication));
        	} 

			// Terminal Authentication
			// Pass result pushed in a_terminalAuthentication
			
			// Communication 
			if(not(match(vc_simu.isFailVerdicts, superset(enum2int(e_aisCommunication))))) {
        		f_pushPassResult(enum2int(e_aisCommunication));
        	} 
        	
        	if(match(vc_simu.isFailVerdicts, p_expectedFailResults)
        		and match(vc_simu.isPassVerdicts, p_expectedPassResults)) {
        	    log("**** ", p_testcaseId, ": Pass: Inspection System produced expected result ****");
        		setverdict(pass);
        	}
        	else {
        	 	log("**** ", p_testcaseId, ": Error: Inspection Sytem did not produce expected result ****");
        		setverdict(fail);   
        	}  
        	
		} // end f_establishVerdict
		
	} // end verdictFunctions
	
	
	group defaults {
	group defaults {
		
		
@@ -68,7 +142,7 @@
        		setverdict(inconc);
        		setverdict(inconc);
        		stop;
        		stop;
        	}
        	}
        	[] any port.receive {
        	[] mrtdport.receive {
        		log("**** a_default: Error: Unexpected message received. ****");
        		log("**** a_default: Error: Unexpected message received. ****");
        		mrtdport.send(m_responseNOK(c_w1w2InstructionCodeNotSupportedOrInvalid));
        		mrtdport.send(m_responseNOK(c_w1w2InstructionCodeNotSupportedOrInvalid));
        		setverdict(inconc);
        		setverdict(inconc);
@@ -85,12 +159,14 @@
	        var CommandGeneric v_report;
	        var CommandGeneric v_report;
	        
	        
	        [] mgmtport.receive(mw_report(int2oct(enum2int(e_aisNoFailure), 2))) {
	        [] mgmtport.receive(mw_report(int2oct(enum2int(e_aisNoFailure), 2))) {
	            log("**** Success reported ****");
				f_pushPassResult(enum2int(e_aisNoFailure));   
				f_pushPassResult(enum2int(e_aisNoFailure));   
				mrtdport.send(m_responseOK);    	    
				mgmtport.send(m_responseOK);    	    
	        }    
	        }    
	        [] mgmtport.receive(mw_report(?)) -> value v_report {
	        [] mgmtport.receive(mw_report(?)) -> value v_report {
	            log("**** Failure reported: ", v_report.payload.genericData.data[0], " ****");
	            f_pushFailResult(oct2int(v_report.payload.genericData.data[0]));
	            f_pushFailResult(oct2int(v_report.payload.genericData.data[0]));
	            mrtdport.send(m_responseOK);	            
	            mgmtport.send(m_responseOK);	            
	        	repeat;    
	        	repeat;    
	        }	        	
	        }	        	
			       		
			       		
+8 −3
Original line number Original line Diff line number Diff line
@@ -635,8 +635,13 @@
        					mgmtport.send(m_setdata_cert);  // to change to ERROR
        					mgmtport.send(m_setdata_cert);  // to change to ERROR
        					}
        					}
        		}*/
        		}*/
        	
        	if(not(PXT_AUTOMATIC_TEST_INTERFACE)) {
				action("Please ensure that IS starts inspection procedure.");
			}
			}
        	
        	
        } // end f_initializeIS
			
	} // end initializationFunctions
	} // end initializationFunctions


	function f_getCertificate(in octetstring p_data) return octetstring {
	function f_getCertificate(in octetstring p_data) return octetstring {
@@ -656,7 +661,7 @@
	    } // end f_pushFailResult
	    } // end f_pushFailResult
	    
	    
	    function f_pushPassResult(in integer p_resultId) runs on MRTD {
	    function f_pushPassResult(in integer p_resultId) runs on MRTD {
	        vc_simu.isPassVerdicts[sizeof(vc_simu.isFailVerdicts)] := p_resultId;
	        vc_simu.isPassVerdicts[sizeof(vc_simu.isPassVerdicts)] := p_resultId;
	    } // end f_pushPassResult
	    } // end f_pushPassResult
		
		
		function f_isTrustedCertificate(in Chr p_chr) runs on MRTD return boolean {
		function f_isTrustedCertificate(in Chr p_chr) runs on MRTD return boolean {
+1 −4
Original line number Original line Diff line number Diff line
@@ -25,9 +25,6 @@ module ePassport_MainModule {
    	execute(TC_LDS_D12());  
    	execute(TC_LDS_D12());  
    	execute(TC_LDS_F04());    
    	execute(TC_LDS_F04());    
    	execute(TC_LDS_H37());       	
    	execute(TC_LDS_H37());       	
    	execute(TC_Fake_For_Test()); 
    	execute(TC_Traveller_Jane()); 
    	execute(TC_checkBac());       	
    }
    }
}
}
with {
with {
+43 −42
Original line number Original line Diff line number Diff line
@@ -11,34 +11,35 @@


module ePassport_Pixits {
module ePassport_Pixits {


	// ATS
	import from ePassport_Types all;

	group testAdapterPixits {

    	// TA choices
    	// TA choices
        /**
        /**
         * @desc	Vendor name for the ePassport equipment
         * @desc	Vendor name for the ePassport equipment
         */
         */
    	modulepar {
    	modulepar {
    		charstring
    		charstring
			PXT_DRIVER_PROVIDER_CLASS_NAME :=
    			PXT_DRIVER_PROVIDER_CLASS_NAME := "org.etsi.epassport.comprion.ComprionImplFactory";
			"org.etsi.epassport.comprion.ComprionImplFactory";
    	};
    	};
        /**
        /**
         * @desc	Vendor name for the IS equipment
         * @desc	Vendor name for the IS equipment
         */
         */
    	modulepar {
    	modulepar {
    		charstring
    		charstring
			PXT_IS_DRIVER_PROVIDER_CLASS_NAME :=
    			PXT_IS_DRIVER_PROVIDER_CLASS_NAME := "org.etsi.epassport.grt.GRTImplFactory";
			"org.etsi.epassport.grt.GRTImplFactory";
    	};
    	};
        /**
        /**
     * @desc	Vendor IP address for the IS equipment
         * @desc	Vendor IP address for the IS equipment (Remote IP;Remote port;Local port)
         */
         */
    	modulepar {
    	modulepar {
    		charstring
    		charstring
			PXT_IS_DRIVER_IP :=
    			PXT_IS_DRIVER_IP := "127.0.0.1;5000;5001"; 
			"127.0.0.1;5000;5001"; // Remote IP;Remote port;Local port
    	};
    	};


	// ATS
	} // end testAdapterPixits
	import from ePassport_Types all;


	/** 
	/** 
	@desc 	Definition of Pixits which apply to all ePassport devices
	@desc 	Definition of Pixits which apply to all ePassport devices
@@ -95,20 +96,20 @@ module ePassport_Pixits {
		
		
	} // end securityPixits
	} // end securityPixits
		
		
	modulepar {charstring PXT_MRZ := "P<D<<MUSTERMANN<<ERIKA<<<<<<<<<<<<<<<<<<<<<<C11T002JM4D<<9608122F1310317<<<<<<<<<<<<<<<6"}
	group ePassportPixits {

	modulepar {charstring PXT_MRZ_LDS_B25 := "P<D<<MUSTERMANN<<ERIKA<<<<<<<<<<<<<<<<<<<<<<C11T002JM4D<<9608<<7F1310317<<<<<<<<<<<<<<<6"}
	    
	    
	    /**
	    /**
	 * @desc	This group contains information needed to configure the System Adapter
	     * @desc	Root directory containing ePassport files (EF.*, MRZ, ...)
	 * - Vendor of the ePassport reader
	 * - Root directory to access to CFG.DFLT.PLAIN directories
	     */
	     */
	group SystemAdapterSettings {
	    modulepar {charstring PXT_EPASSPORT_DATA_ROOT := "G:/FSCOM/STF400/trunk/Helpers/ElementFilesImpl/ePassportData/"}
	    /**
	    
	     * @desc	Root directory to access to CFG.DFLT.PLAIN directories
	} // end ePassportPixits
	     */
	
	    modulepar charstring PXT_EPASSPORT_DATA_ROOT := "G:/FSCOM/STF400/trunk/Helpers/ElementFilesImpl/ePassportData/";
	group iutPixits {
	} // End of group SystemAdapterSettings
	    
	    modulepar {boolean PXT_AUTOMATIC_TEST_INTERFACE := false}
	    
	} // end iutPixits
	
} // end ePassport_Pixits
} // end ePassport_Pixits
+1 −1
Original line number Original line Diff line number Diff line
@@ -65,7 +65,7 @@ module ePassport_Templates {
    	
    	
    	// TEMPLATES m_start
    	// TEMPLATES m_start
        template (value) Response m_setdata_mrz := {
        template (value) Response m_setdata_mrz := {
           	responseData := m_responseData(char2oct(PXT_MRZ)),   // to be change later by providing real data !!!
           	responseData := m_responseData(char2oct("bleu")),   // to be change later by providing real data !!!
        	w1w2 := c_w1w2NormalProcessing
        	w1w2 := c_w1w2NormalProcessing
        }
        }
        
        
Loading