1 /**
  2  *  ---------
  3  * |.##> <##.|  Open Smart Card Development Platform (www.openscdp.org)
  4  * |#       #|  
  5  * |#       #|  Copyright (c) 1999-2008 CardContact Software & System Consulting
  6  * |'##> <##'|  Andreas Schwier, 32429 Minden, Germany (www.cardcontact.de)
  7  *  --------- 
  8  *
  9  *  This file is part of OpenSCDP.
 10  *
 11  *  OpenSCDP is free software; you can redistribute it and/or modify
 12  *  it under the terms of the GNU General Public License version 2 as
 13  *  published by the Free Software Foundation.
 14  *
 15  *  OpenSCDP is distributed in the hope that it will be useful,
 16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 18  *  GNU General Public License for more details.
 19  *
 20  *  You should have received a copy of the GNU General Public License
 21  *  along with OpenSCDP; if not, write to the Free Software
 22  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 23  *
 24  * @fileoverview Script to load all tests for the EMV simulation test suite into the GUI test runner
 25  */
 26 
 27 //
 28 // Script to load test cases
 29 //
 30 
 31 
 32 load("tools/TestRunner.js");
 33 load("tools/TestGroup.js");
 34 load("tools/TestProcedure.js");
 35 
 36 load("../emv.js");
 37 load("../emvView.js");
 38 
 39 
 40 var param = new Array();
 41 
 42 param["card"] = new Card(_scsh3.reader);
 43 param["crypto"] = new Crypto();
 44 
 45 param["contactless"] = false;			// Use 1PAY.SYS.DDF01 or 2PAY.SYSDDF01
 46 
 47 
 48 
 49 /**
 50  * Create new instance of EMV class for tests.
 51  *
 52  * <p>This method allows to tailor some global settings for the tests.</p>
 53  * @param {Card} card the EMV card
 54  * @param {Crypto} crypto the crypto provider to use
 55  * @type EMV
 56  * @return a new instance of the EMV class
 57  */
 58 function newEMV(card, crypto) {
 59 	var emv = new EMV(card, crypto);
 60 	emv.verbose = true;
 61 	return emv;
 62 }
 63 
 64 
 65 
 66 var testRunner = new TestRunner("EMV Simulation Test Suite");
 67 
 68 testRunner.addTestGroupFromXML("tg_application_selection.xml", param);
 69 testRunner.addTestGroupFromXML("tg_initiate_application_processing.xml", param);
 70 testRunner.addTestGroupFromXML("tg_read_application_data.xml", param);
 71 
 72 print("Test-Suite loaded...");
 73