Commit 290f5782 authored by nikolajev's avatar nikolajev
Browse files

Updated DIAMETER validation testing solution and adapter

parent 6c70d778
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -77,7 +77,7 @@ namespace TestCastTortureAdapter
                    return;
                    return;
                }
                }


                FileStream fs = new FileStream(sFilePath, FileMode.Open);
                FileStream fs = new FileStream(sFilePath, FileMode.Open, FileAccess.Read);
                int nLen = (int)fs.Length;
                int nLen = (int)fs.Length;
                byte[] data = new byte[nLen];
                byte[] data = new byte[nLen];
                int nRead = 0;
                int nRead = 0;
+44 −37
Original line number Original line Diff line number Diff line
@@ -31,13 +31,16 @@ module DiameterTortureTestCases
			setverdict(inconc);
			setverdict(inconc);
		}
		}
	}
	}
	
	const boolean TEST_ENCODING := false;
	altstep receive_specific_DIAMETER_MSG(template DIAMETER_MSG tmpl) runs on DiameterComponent
	altstep receive_specific_DIAMETER_MSG(template DIAMETER_MSG tmpl) runs on DiameterComponent
	{
	{
		var DIAMETER_MSG msg;
		var DIAMETER_MSG msg;
		[]p.receive(tmpl) -> value msg
		[]p.receive(tmpl) -> value msg
		{
			if(TEST_ENCODING == true)
			{
			{
				loopback.send(msg);//test if encoded message looks the same...
				loopback.send(msg);//test if encoded message looks the same...
			}
			setverdict(pass);
			setverdict(pass);
		}
		}
		[]p.receive(DIAMETER_MSG:?)
		[]p.receive(DIAMETER_MSG:?)
@@ -94,142 +97,142 @@ module DiameterTortureTestCases
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_3GPP_Update_Location_Answer
	
	
	testcase TC_Capabilities_Exchange_Answer() runs on DiameterComponent system DiameterComponent
	testcase TC_Capabilities_Exchange_Answer() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Capabilities_Exchange_Answer
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{cEA_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{cEA_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Capabilities_Exchange_Answer
	
	
	testcase TC_Capabilities_Exchange_Request() runs on DiameterComponent system DiameterComponent
	testcase TC_Capabilities_Exchange_Request() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Capabilities_Exchange_Request
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{cER_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{cER_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Capabilities_Exchange_Request
	
	
	
	
	testcase TC_268_A() runs on DiameterComponent
	testcase TC_268_A() runs on DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_268_A
		tmrTimeout.start;
		tmrTimeout.start;
		receiveDIAMETER_MSG();
		receiveDIAMETER_MSG();
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_268_A
	
	
	testcase TC_268_R() runs on DiameterComponent
	testcase TC_268_R() runs on DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_268_R
		tmrTimeout.start;
		tmrTimeout.start;
		receiveDIAMETER_MSG();
		receiveDIAMETER_MSG();
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_268_R
	
	
	testcase TC_Accounting_Answer() runs on DiameterComponent system DiameterComponent
	testcase TC_Accounting_Answer() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Accounting_Answer
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{aCA_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{aCA_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Accounting_Answer
	
	
	testcase TC_Accounting_Request() runs on DiameterComponent system DiameterComponent
	testcase TC_Accounting_Request() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Accounting_Request
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{aCR_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{aCR_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Accounting_Request
	
	
	testcase TC_Device_Watchdog_Answer() runs on DiameterComponent system DiameterComponent
	testcase TC_Device_Watchdog_Answer() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Device_Watchdog_Answer
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{dWA_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{dWA_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Device_Watchdog_Answer
	
	
	testcase TC_Device_Watchdog_Request() runs on DiameterComponent system DiameterComponent
	testcase TC_Device_Watchdog_Request() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Device_Watchdog_Request
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{dWR_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{dWR_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Device_Watchdog_Request
	
	
	testcase TC_Re_Auth_Answer() runs on DiameterComponent system DiameterComponent
	testcase TC_Re_Auth_Answer() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Re_Auth_Answer
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{rAA_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{rAA_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Re_Auth_Answer
	
	
	testcase TC_Re_Auth_Request() runs on DiameterComponent system DiameterComponent
	testcase TC_Re_Auth_Request() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Re_Auth_Request
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{rAR_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{rAR_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Re_Auth_Request
	
	
	testcase TC_Auth_Accounting_Answer() runs on DiameterComponent system DiameterComponent
	testcase TC_Auth_Accounting_Answer() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Auth_Accounting_Answer
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{aAA_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{aAA_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Auth_Accounting_Answer
	
	
	testcase TC_Auth_Accounting_Request() runs on DiameterComponent system DiameterComponent
	testcase TC_Auth_Accounting_Request() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Auth_Accounting_Request
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{aAR_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{aAR_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Auth_Accounting_Request
	
	
	testcase TC_Credit_Control_Answer() runs on DiameterComponent system DiameterComponent
	testcase TC_Credit_Control_Answer() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Credit_Control_Answer
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{cCA_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{cCA_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Credit_Control_Answer
	
	
	testcase TC_Credit_Control_Request() runs on DiameterComponent system DiameterComponent
	testcase TC_Credit_Control_Request() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Credit_Control_Request
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{cCR_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{cCR_MSG := ?});
		
		
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Credit_Control_Request
	
	
	
	
	testcase TC_Session_Termination_Answer() runs on DiameterComponent system DiameterComponent
	testcase TC_Session_Termination_Answer() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Session_Termination_Answer
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{sTA_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{sTA_MSG := ?});
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Session_Termination_Answer
	
	
	testcase TC_Session_Termination_Request() runs on DiameterComponent system DiameterComponent
	testcase TC_Session_Termination_Request() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Session_Termination_Request
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{sTR_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{sTR_MSG := ?});
		
		
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Session_Termination_Request
	
	
	
	
	testcase TC_Multimedia_Auth_Request() runs on DiameterComponent system DiameterComponent
	testcase TC_Multimedia_Auth_Request() runs on DiameterComponent system DiameterComponent
	{//3GPP-Update-Location answer
	{//TC_Multimedia_Auth_Request
		map(self:p, system:p);
		map(self:p, system:p);
		connect(self:loopback,mtc:loopback);
		connect(self:loopback,mtc:loopback);
		tmrTimeout.start;
		tmrTimeout.start;
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{mAR_MSG := ?});
		receive_specific_DIAMETER_MSG(DIAMETER_MSG:{mAR_MSG := ?});
		
		
	} // End of testcase TC_3GPP_Update_Location_Answer
	} // End of testcase TC_Multimedia_Auth_Request
	
	
	control
	control
	{
	{
@@ -240,11 +243,15 @@ module DiameterTortureTestCases
		execute(TC_3GPP_Update_Location_Answer());//316
		execute(TC_3GPP_Update_Location_Answer());//316
	
	
		execute(TC_Capabilities_Exchange_Answer());//257
		execute(TC_Capabilities_Exchange_Answer());//257
		
		execute(TC_Capabilities_Exchange_Request());//257
		execute(TC_Capabilities_Exchange_Request());//257
		
		execute(TC_268_A());
		execute(TC_268_A());
		execute(TC_268_R());
		execute(TC_268_R());
		
		execute(TC_Accounting_Answer());//271
		execute(TC_Accounting_Answer());//271
		execute(TC_Accounting_Request());//271
		execute(TC_Accounting_Request());//271
		
		execute(TC_Device_Watchdog_Answer());//280
		execute(TC_Device_Watchdog_Answer());//280
		execute(TC_Device_Watchdog_Request());//280
		execute(TC_Device_Watchdog_Request());//280