PageRenderTime 59ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/Cuke4AS3/src/com/flashquartermaster/cuke4as3/Cuke4AS3.as

http://github.com/flashquartermaster/Cuke4AS3
ActionScript | 736 lines | 501 code | 133 blank | 102 comment | 33 complexity | ee67aa26efdb895c005a86ac7600a07c MD5 | raw file
  1. /**
  2. * Copyright (c) 2011 FlashQuartermaster Ltd
  3. *
  4. * Permission is hereby granted, free of charge, to any person
  5. * obtaining a copy of this software and associated documentation
  6. * files (the "Software"), to deal in the Software without
  7. * restriction, including without limitation the rights to use,
  8. * copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. * copies of the Software, and to permit persons to whom the
  10. * Software is furnished to do so, subject to the following
  11. * conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be
  14. * included in all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  18. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  20. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  21. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  23. * OTHER DEALINGS IN THE SOFTWARE.
  24. *
  25. * @author Tom Coxen
  26. * @version
  27. **/
  28. package
  29. com.flashquartermaster.cuke4as3
  30. {
  31. import com.flashquartermaster.cuke4as3.filesystem.WireFileParser;
  32. import com.flashquartermaster.cuke4as3.net.BinarySwfLoader;
  33. import com.flashquartermaster.cuke4as3.net.CommandProcessor;
  34. import com.flashquartermaster.cuke4as3.net.Cuke4AS3Server;
  35. import com.flashquartermaster.cuke4as3.process.CompilerProcess;
  36. import com.flashquartermaster.cuke4as3.process.CucumberProcess;
  37. import com.flashquartermaster.cuke4as3.process.Process;
  38. import com.flashquartermaster.cuke4as3.reflection.IStepInvoker;
  39. import com.flashquartermaster.cuke4as3.reflection.IStepMatcher;
  40. import com.flashquartermaster.cuke4as3.reflection.StepInvoker;
  41. import com.flashquartermaster.cuke4as3.reflection.StepMatcher;
  42. import com.flashquartermaster.cuke4as3.reflection.SwfProcessor;
  43. import com.flashquartermaster.cuke4as3.util.StringUtilities;
  44. import com.flashquartermaster.cuke4as3.vo.InvokeArgumentsProcessor;
  45. import com.flashquartermaster.cuke4as3.vo.ServerInfo;
  46. import com.furusystems.logging.slf4as.global.*;
  47. import flash.desktop.NativeApplication;
  48. import flash.desktop.NativeProcess;
  49. import flash.display.Sprite;
  50. import flash.events.ErrorEvent;
  51. import flash.events.Event;
  52. import flash.events.InvokeEvent;
  53. import flash.filesystem.File;
  54. import flash.system.ApplicationDomain;
  55. import flash.system.System;
  56. import org.fluint.uiImpersonation.IVisualEnvironmentBuilder;
  57. import org.fluint.uiImpersonation.UIImpersonator;
  58. import org.fluint.uiImpersonation.VisualTestEnvironmentBuilder;
  59. public class Cuke4AS3 extends Sprite
  60. {
  61. //Native processes
  62. private var _compilerProcess:CompilerProcess;
  63. private var _cucumberProcess:CucumberProcess;
  64. //Net
  65. private var _binarySwfLoader:BinarySwfLoader;
  66. private var _cuke4AS3Server:Cuke4AS3Server;
  67. //Reflection
  68. private var _swfProcessor:SwfProcessor;
  69. private var _stepInvoker:IStepInvoker;
  70. private var _stepMatcher:IStepMatcher;
  71. //Accessors
  72. private var _srcDir:String;
  73. private var _mxmlcPath:String;
  74. private var _mxmlcArgs:String;
  75. private var _cucumberPath:String;
  76. private var _cucumberArgs:String;
  77. private var _headless:String;
  78. public function Cuke4AS3( hasUi:Boolean = false )
  79. {
  80. if( expectCommandLineArgs( hasUi ) )
  81. {
  82. NativeApplication.nativeApplication.addEventListener( InvokeEvent.INVOKE, onInvoke );
  83. }
  84. NativeApplication.nativeApplication.addEventListener( Event.EXITING, onExiting );
  85. //If using a ui make a new Cuke4AS3( true )
  86. //Listen for events esp error event coming out of here then call init() and
  87. //explicitly set the srcDir, mxmlcPath, cucumberPath, mxmlcArgs, cucumberArgs
  88. //before calling run() to set everything in motion
  89. }
  90. private function expectCommandLineArgs( hasUi:Boolean ):Boolean
  91. {
  92. return hasUi == false;
  93. }
  94. public function init():void
  95. {
  96. info( "Cuke4AS3 : init" );
  97. try
  98. {
  99. _cuke4AS3Server = new Cuke4AS3Server();
  100. }
  101. catch( e:Error )//E.g. ServerSocket not supported
  102. {
  103. dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, e.message, e.errorID ) );
  104. }
  105. _compilerProcess = new CompilerProcess();
  106. _compilerProcess.isUseBundledDConsole = true;
  107. _compilerProcess.isUseBundledFlexUnit = true;
  108. _cucumberProcess = new CucumberProcess();
  109. _binarySwfLoader = new BinarySwfLoader();
  110. _swfProcessor = new SwfProcessor();
  111. }
  112. public function run():void
  113. {
  114. info( "Cuke4AS3 : run" );
  115. if( validateMinimumRunRequirements() )
  116. {
  117. houseKeeping();
  118. runCompiler();
  119. }
  120. else
  121. {
  122. dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "Cannot run, ensure you have set srcDir, mxmlcPath and cucumberPath", Config.CUKE_CANNOT_RUN_ERROR ) );
  123. }
  124. }
  125. public function stop():void
  126. {
  127. info( "Cuke4AS3 : stop" );
  128. // stop() should be called externally by a UI in order to do the housekeeping
  129. // It should do this whenever it encounters:
  130. // a compiler process error
  131. // a swf loader error
  132. // a swf processor error
  133. // a server error
  134. // a cucumber process error
  135. //Todo: Marshall these errors into one error event dispatched by this class
  136. compilerDestroy();
  137. cucumberDestroy();
  138. swfLoaderDestroy();
  139. swfProcessorDestroy();
  140. // If we have called stop in the middle of a scenario we need
  141. // to make sure destroy is called on the steps object
  142. stepInvokerDestroy();
  143. stepMatcherDestroy();
  144. // Don't need to kill CukeServer since that is all
  145. // managed withing its run function
  146. // serverDestroy();
  147. houseKeeping();
  148. }
  149. //Run Compiler
  150. //============
  151. private function runCompiler():void
  152. {
  153. info( "Cuke4AS3 : runCompiler" );
  154. _compilerProcess.init();
  155. _compilerProcess.srcDir = srcDir;
  156. _compilerProcess.mxmlcPath = mxmlcPath;
  157. _compilerProcess.additionalArgs = mxmlcArgs;
  158. _compilerProcess.addEventListener( Event.COMPLETE, onCompilerProcessComplete );
  159. _compilerProcess.addEventListener( Process.PROCESS_ERROR_EVENT, onCompilerProcessError );
  160. _compilerProcess.run();
  161. }
  162. private function onCompilerProcessComplete( event:Event ):void
  163. {
  164. info( "Cuke4AS3 : onCompilerProcessComplete" );
  165. //Destroy later after we have extracted the steps directory listing
  166. //that the swf processor uses
  167. removeCompilerProcessEventListeners();
  168. loadCompiledSwf();
  169. }
  170. private function onCompilerProcessError( event:ErrorEvent ):void
  171. {
  172. warn( "Cuke4AS3 : onCompilerProcessError : shell exited with a compile error :", event );
  173. noUiExit();
  174. }
  175. //Load compiled Swf
  176. //=================
  177. private function loadCompiledSwf():void
  178. {
  179. info( "Cuke4AS3 : loadCompiledSwf" );
  180. _binarySwfLoader.init();
  181. _binarySwfLoader.swfToLoad = "file://" + srcDir + File.separator + Config.OUTPUT_SWF;
  182. addSwfLoaderListeners();
  183. _binarySwfLoader.load();
  184. }
  185. private function onSwfLoaderError( event:ErrorEvent ):void
  186. {
  187. fatal( "Cuke4AS3 : onSwfLoaderError :", event.text );
  188. noUiExit();
  189. }
  190. private function onSwfLoaderComplete( event:Event ):void
  191. {
  192. info( "Cuke4AS3 : onSwfLoaderComplete" );
  193. // The binary swf loader puts the compiled step definitions into a new application domain
  194. // in order to avoid conflicting class names and to ensure we invoke the right function on the right object
  195. var applicationDomain:ApplicationDomain = _binarySwfLoader.applicationDomain;
  196. swfLoaderDestroy();
  197. processCompiledSwf( applicationDomain );
  198. }
  199. //Post compile/load processing
  200. //============================
  201. private function processCompiledSwf( applicationDomain:ApplicationDomain ):void
  202. {
  203. info( "Cuke4AS3 : processCompiledSwf :", applicationDomain );
  204. _stepInvoker = new StepInvoker();
  205. _stepInvoker.applicationDomain = applicationDomain;
  206. //Step matcher sets invokable steps on the invoker once a match has been made
  207. _stepMatcher = new StepMatcher( _stepInvoker );
  208. _swfProcessor.applicationDomain = applicationDomain;
  209. //Swf processor sets a list matchable steps on the step matcher
  210. _swfProcessor.stepMatcher = _stepMatcher;
  211. _swfProcessor.stepDirectoryFiles = _compilerProcess.step_definitionsDirectoryListing;
  212. compilerDestroy();
  213. addSwfProcessorListeners();
  214. _swfProcessor.processLoadedClasses();
  215. }
  216. private function onSwfProcessorError( event:Event ):void
  217. {
  218. warn( "Cuke4AS3 : onSwfProcessorError :", event );
  219. noUiExit();
  220. }
  221. private function onSwfProcessorComplete( event:Event ):void
  222. {
  223. info( "Cuke4AS3 : onSwfProcessorComplete :", event );
  224. swfProcessorDestroy();
  225. runCuke4AS3Server();
  226. }
  227. private function runCuke4AS3Server():void
  228. {
  229. info( "Cuke4AS3 : runCuke4AS3Server" );
  230. try
  231. {
  232. var wireFileParser:WireFileParser = new WireFileParser();
  233. var serverInfo:ServerInfo = wireFileParser.getServerInfoFromWireFile( srcDir );
  234. wireFileParser.destroy();
  235. }
  236. catch( e:Error )
  237. {
  238. fatal( "Cuke4AS3 : runCuke4AS3Server :", e, e.getStackTrace() );//No wire file so no point in carrying on
  239. dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "Cannot run. There is no wire file in your features or step_definitions directories", Config.CUKE_NO_WIRE_FILE ) );
  240. return;
  241. }
  242. _cuke4AS3Server.host = serverInfo.host;
  243. _cuke4AS3Server.port = serverInfo.port;
  244. serverInfo.destroy();
  245. var commandProcessor:CommandProcessor = new CommandProcessor();
  246. //Command processor asks to match steps and invoke them based on
  247. //Cucumber's requests
  248. commandProcessor.stepInvoker = _stepInvoker;
  249. commandProcessor.stepMatcher = _stepMatcher;
  250. _cuke4AS3Server.commandProcessor = commandProcessor;
  251. addServerListeners();
  252. _cuke4AS3Server.run();
  253. }
  254. private function onServerError( event:Event ):void
  255. {
  256. fatal( "Cuke4AS3 : onServerError :", event );
  257. noUiExit();
  258. }
  259. private function onServerRunning( event:Event ):void
  260. {
  261. info( "Cuke4AS3 : onServerRunning :", event );
  262. runCucumber();
  263. }
  264. private function runCucumber():void
  265. {
  266. info( "Cuke4AS3 : runCucumber" );
  267. //Run cucumber
  268. _cucumberProcess.init();
  269. _cucumberProcess.srcDir = srcDir;
  270. _cucumberProcess.cucumberPath = cucumberPath;
  271. _cucumberProcess.additionalArgs = cucumberArgs;
  272. _cucumberProcess.addEventListener( Event.COMPLETE, onCucumberProcessComplete );
  273. _cucumberProcess.addEventListener( Process.PROCESS_ERROR_EVENT, onCucumberProcessError );
  274. _cucumberProcess.run();
  275. }
  276. private function onCucumberProcessComplete( event:Event ):void
  277. {
  278. info( "Cuke4AS3 : onCucumberProcessComplete : Cucumber is done :", event );
  279. // If no scenarios were to be run cucumber will have never connected to the wire server
  280. // so we exit here. Otherwise exit onCucumberClientClose
  281. if( !_cuke4AS3Server.isCucumberConnected() )
  282. {
  283. onCucumberClientClose();
  284. }
  285. }
  286. private function onCucumberProcessError( event:ErrorEvent ):void
  287. {
  288. warn( "Cuke4AS3 : onCucumberProcessError : shell exited with a Cucumber error :", event );
  289. //Todo: Deal with errorcode 1 exit in -S, --strict mode
  290. // If cucumber encounters errors and exits with an error code ensure we exit here. Otherwise
  291. // exit on onCucumberClientClose
  292. if( !_cuke4AS3Server.isCucumberConnected() )
  293. {
  294. onCucumberClientClose();
  295. }
  296. }
  297. private function onCucumberClientClose( event:Event = null ):void
  298. {
  299. //All done
  300. dispatchEvent( new Event( Event.COMPLETE ) );
  301. noUiExit();
  302. }
  303. //Command line runner
  304. //===================
  305. //To run in headless mode you will need the following command line args in your debug configuration or adl
  306. //-srcDir "/Users/username/Documents/Adobe Flash Builder 4.5/Calculator/src/"
  307. //srcDir must contain a 'features' directory which can in turn contain a 'filename.wire' file
  308. //and 'step_definitions' directory for *.as step definitions which can also contain a feature.wire file
  309. //-mxmlc "/Applications/Adobe Flash Builder 4.5/sdks/4.5.1/bin/mxmlc" path to mxmlc compiler
  310. //-cucumber "/usr/local/bin/cucumber" path to cucumber executable
  311. //-headless true
  312. //for mxmlc and cucumber args THE WHOLE STRING MUST BE ENCLOSED BY SINGLE QUOTES WITHOUT WHITE SPACE
  313. //File paths with spaces in MUST BE ENCLOSED IN SINGLE QUOTES
  314. //-mxmlcArgs "'-compiler-arg arg 'path with spaces' -other-compiler-arg arg'"
  315. //-cucumberArgs "'-cucumber-arg arg -other-arg arg'"
  316. private function onInvoke( event:InvokeEvent ):void
  317. {
  318. try
  319. {
  320. info( "Cuke4AS3 : onInvoke :", event.arguments.length, event.arguments.toString() );
  321. var invokeArgsProcessor:InvokeArgumentsProcessor = new InvokeArgumentsProcessor();
  322. if( invokeArgsProcessor.processArguments( event.arguments ) )
  323. {
  324. srcDir = invokeArgsProcessor.srcDir;
  325. mxmlcPath = invokeArgsProcessor.mxmlc;
  326. cucumberPath = invokeArgsProcessor.cucumber;
  327. if( invokeArgsProcessor.mxmlcArgs != null )
  328. {
  329. mxmlcArgs = StringUtilities.stripSingleQuotesAtStartAndEndOfString( invokeArgsProcessor.mxmlcArgs );
  330. }
  331. if( invokeArgsProcessor.cucumberArgs != null )
  332. {
  333. cucumberArgs = StringUtilities.stripSingleQuotesAtStartAndEndOfString( invokeArgsProcessor.cucumberArgs );
  334. }
  335. if( invokeArgsProcessor.headless != null )
  336. {
  337. _headless = invokeArgsProcessor.headless;
  338. }
  339. }
  340. invokeArgsProcessor.destroy();
  341. // debug("Cuke4AS3 : onInvoke : mxmlcArgs :",mxmlcArgs);
  342. // debug("Cuke4AS3 : onInvoke : cucumberArgs",cucumberArgs);
  343. // info("Cuke4AS3 : onInvoke : can run? :",NativeProcess.isSupported, invokeArgsProcessor.headless);
  344. if( !NativeProcess.isSupported )
  345. {
  346. throw new Error( "NativeProcess is not supported please use extendedDesktop profile" );
  347. }
  348. else
  349. {
  350. //Set up fluint visual test environment for UIImpersonator
  351. var testUI:Sprite = new Sprite();
  352. // testUI.visible = false;//Cannot detect Video like this :(
  353. addChild( testUI );
  354. visualTestEnvironment = testUI;
  355. init();
  356. run();
  357. }
  358. }
  359. catch( e:Error )
  360. {
  361. fatal( "Cuke4AS3 : onInvoke :", e, e.getStackTrace() );
  362. }
  363. }
  364. //Support
  365. //=======
  366. private function validateMinimumRunRequirements():Boolean
  367. {
  368. //The bare minimum to run is srcDir, mxmlc and cucumber
  369. return ( StringUtilities.isNotNullAndNotEmptyString( srcDir ) )
  370. && ( StringUtilities.isNotNullAndNotEmptyString( mxmlcPath ) )
  371. && ( StringUtilities.isNotNullAndNotEmptyString( cucumberPath ) );
  372. }
  373. // Explain this
  374. override public function dispatchEvent( event:Event ):Boolean
  375. {
  376. var b:Boolean = false;
  377. if( _headless != "true" )//dispatch as normal
  378. {
  379. b = super.dispatchEvent( event );
  380. }
  381. else
  382. {
  383. //Write this top level error to a file for when headless
  384. debug( "Cuke4AS3 : dispatchEvent : In headless mode :", event );
  385. b = false;
  386. noUiExit();
  387. }
  388. return b;
  389. }
  390. private function noUiExit():void
  391. {
  392. if( _headless == "true" )
  393. {
  394. info( "Cuke4AS3 : exit" );
  395. NativeApplication.nativeApplication.dispatchEvent( new Event( Event.EXITING ) );//Note: exiting is not dispatched when we call exit()
  396. NativeApplication.nativeApplication.exit();//Terminates application, not supported on iOS
  397. }
  398. }
  399. //House keeping
  400. //=============
  401. public function onExiting( event:Event = null ):void
  402. {
  403. info( "Cuke4AS3 : onExiting" );
  404. swfLoaderDestroy();
  405. _binarySwfLoader = null;
  406. swfProcessorDestroy();
  407. _swfProcessor = null;
  408. compilerDestroy();
  409. _compilerProcess = null;
  410. cucumberDestroy();
  411. _cucumberProcess = null;
  412. serverDestroy();
  413. _cuke4AS3Server = null;
  414. stepInvokerDestroy();
  415. _stepInvoker = null;
  416. stepMatcherDestroy();
  417. _stepMatcher = null
  418. _srcDir = null;
  419. _mxmlcPath = null;
  420. _mxmlcArgs = null;
  421. _cucumberPath = null;
  422. _cucumberArgs = null;
  423. houseKeeping();
  424. }
  425. private function stepMatcherDestroy():void
  426. {
  427. if( _stepMatcher != null )//may not have been made
  428. {
  429. _stepMatcher.destroy();
  430. }
  431. }
  432. private function stepInvokerDestroy():void
  433. {
  434. if( _stepInvoker != null )//May not have been made
  435. {
  436. _stepInvoker.destroy();
  437. }
  438. }
  439. private function cucumberDestroy():void
  440. {
  441. if( _cucumberProcess != null )
  442. {
  443. removeCucumberProcessEventListeners();
  444. _cucumberProcess.destroy();
  445. }
  446. }
  447. private function compilerDestroy():void
  448. {
  449. if( _compilerProcess != null )
  450. {
  451. removeCompilerProcessEventListeners();
  452. _compilerProcess.destroy();
  453. }
  454. }
  455. private function swfProcessorDestroy():void
  456. {
  457. if( _swfProcessor != null )
  458. {
  459. removeSwfProcessorListeners();
  460. _swfProcessor.destroy();
  461. }
  462. }
  463. private function swfLoaderDestroy():void
  464. {
  465. if( _binarySwfLoader != null )
  466. {
  467. removeSwfLoaderListeners();
  468. _binarySwfLoader.destroy();
  469. }
  470. }
  471. private function serverDestroy():void
  472. {
  473. if( _cuke4AS3Server != null )
  474. {
  475. removeServerListeners();
  476. _cuke4AS3Server.destroy();
  477. }
  478. }
  479. private function houseKeeping():void
  480. {
  481. UIImpersonator.removeAllChildren();
  482. System.gc();
  483. }
  484. //Listeners
  485. //=========
  486. //SwfLoader listeners
  487. private function addSwfLoaderListeners():void
  488. {
  489. _binarySwfLoader.addEventListener( Event.COMPLETE, onSwfLoaderComplete );
  490. _binarySwfLoader.addEventListener( ErrorEvent.ERROR, onSwfLoaderError );
  491. }
  492. private function removeSwfLoaderListeners():void
  493. {
  494. _binarySwfLoader.removeEventListener( Event.COMPLETE, onSwfLoaderComplete );
  495. _binarySwfLoader.removeEventListener( ErrorEvent.ERROR, onSwfLoaderError );
  496. }
  497. //Process listeners
  498. private function removeCompilerProcessEventListeners():void
  499. {
  500. _compilerProcess.removeEventListener( Event.COMPLETE, onCompilerProcessComplete );
  501. _compilerProcess.removeEventListener( Process.PROCESS_ERROR_EVENT, onCompilerProcessError );
  502. }
  503. private function removeCucumberProcessEventListeners():void
  504. {
  505. _cucumberProcess.removeEventListener( Event.COMPLETE, onCucumberProcessComplete );
  506. _cucumberProcess.removeEventListener( Process.PROCESS_ERROR_EVENT, onCucumberProcessError );
  507. }
  508. //Swf Processor listeners
  509. private function addSwfProcessorListeners():void
  510. {
  511. _swfProcessor.addEventListener( Event.COMPLETE, onSwfProcessorComplete );
  512. _swfProcessor.addEventListener( ErrorEvent.ERROR, onSwfProcessorError );
  513. }
  514. private function removeSwfProcessorListeners():void
  515. {
  516. _swfProcessor.removeEventListener( Event.COMPLETE, onSwfProcessorComplete );
  517. _swfProcessor.removeEventListener( ErrorEvent.ERROR, onSwfProcessorError );
  518. }
  519. //Server listeners
  520. private function addServerListeners():void
  521. {
  522. _cuke4AS3Server.addEventListener( ErrorEvent.ERROR, onServerError );
  523. _cuke4AS3Server.addEventListener( Event.INIT, onServerRunning );
  524. _cuke4AS3Server.addEventListener( Event.COMPLETE, onCucumberClientClose );
  525. }
  526. private function removeServerListeners():void
  527. {
  528. _cuke4AS3Server.removeEventListener( ErrorEvent.ERROR, onServerError );
  529. _cuke4AS3Server.removeEventListener( Event.INIT, onServerRunning );
  530. _cuke4AS3Server.removeEventListener( Event.COMPLETE, onCucumberClientClose );
  531. }
  532. //Accessors
  533. //=========
  534. public function get compilerProcess():CompilerProcess
  535. {
  536. return _compilerProcess;
  537. }
  538. public function get cucumberProcess():CucumberProcess
  539. {
  540. return _cucumberProcess;
  541. }
  542. public function get srcDir():String
  543. {
  544. return _srcDir;
  545. }
  546. public function set srcDir( value:String ):void
  547. {
  548. _srcDir = value;
  549. }
  550. public function get cucumberPath():String
  551. {
  552. return _cucumberPath;
  553. }
  554. public function set cucumberPath( value:String ):void
  555. {
  556. _cucumberPath = value;
  557. }
  558. public function get mxmlcPath():String
  559. {
  560. return _mxmlcPath;
  561. }
  562. public function set mxmlcPath( value:String ):void
  563. {
  564. _mxmlcPath = value;
  565. }
  566. public function set visualTestEnvironment( visualDisplayRoot:Sprite ):void
  567. {
  568. var testEnvironment:IVisualEnvironmentBuilder = VisualTestEnvironmentBuilder.getInstance( visualDisplayRoot );
  569. }
  570. public function get mxmlcArgs():String
  571. {
  572. return _mxmlcArgs;
  573. }
  574. public function set mxmlcArgs( value:String ):void
  575. {
  576. _mxmlcArgs = value;
  577. }
  578. public function get cucumberArgs():String
  579. {
  580. return _cucumberArgs;
  581. }
  582. public function set cucumberArgs( value:String ):void
  583. {
  584. _cucumberArgs = value;
  585. }
  586. public function get cuke4AS3Server():Cuke4AS3Server
  587. {
  588. return _cuke4AS3Server;
  589. }
  590. public function set cuke4AS3Server( value:Cuke4AS3Server ):void
  591. {
  592. _cuke4AS3Server = value;
  593. }
  594. public function get swfLoader():BinarySwfLoader
  595. {
  596. return _binarySwfLoader;
  597. }
  598. public function get swfProcessor():SwfProcessor
  599. {
  600. return _swfProcessor;
  601. }
  602. }
  603. }