1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    Singapore
    Posts
    7
    Vote Rating
    0
    SYZ is on a distinguished road

      0  

    Default Unanswered: Automated ExtJS testing using Jasmine and PhantomJS

    Unanswered: Automated ExtJS testing using Jasmine and PhantomJS


    Hi All,

    I'm trying to use Jasmine + PhantomJS to automate ExtJS testing on my CI server. I've looked through Authur's post (http://www.sencha.com/blog/automating-unit-tests/) and his examples work fine. However, when I followed the ExtJS Doc here http://docs.sencha.com/ext-js/4-1/#!/guide/testing I have problems:

    When I open the Jasmine tests in a browser, it works fine. However, when I run it in PhantomJS, I get the following errors.

    phantomjs.jpg

    I compared the difference between the two projects and I suspect the error was thrown because of the run-test.html file in ExtJS Doc example. It directly calls "app-test.js" without including the following code in the <body> (which is present in the run-spec.html in Arthur's example)

    Code:
    <script type="text/javascript">	(function() {
    		var jasmineEnv = jasmine.getEnv();
    		jasmineEnv.updateInterval = 1000;
    
    
    		var htmlReporter = new jasmine.HtmlReporter();
    
    
    		jasmineEnv.addReporter(htmlReporter);
    
    
    		jasmineEnv.specFilter = function(spec) {
    		return htmlReporter.specFilter(spec);
    		};
    
    
    		var currentWindowOnload = window.onload;
    
    
    		window.onload = function() {
    		if (currentWindowOnload) {
    		currentWindowOnload();
    		}
    		execJasmine();
    		};
    
    
    		function execJasmine() {
    		jasmineEnv.execute();
    		}
    
    
        })();
        </script>
    I tried to add these code in my html but it failed to load the ExtJS project. Can any one show me how to do it and run via PhantomJS properly?

    Thanks a lot!

  2. #2
    Sencha User
    Join Date
    Sep 2012
    Location
    Singapore
    Posts
    7
    Vote Rating
    0
    SYZ is on a distinguished road

      0  

    Default


    Hi guys,

    I think I have found the problem.

    Code:
    <script type="text/javascript" src="/ext-4/ext-all.js"></script>
    In the HTML file, when adding the ExtJS library, initially I added ext-debug.js and PhantomJS was throwing errors. When I changedto ext-all.js, it was fine...

    I'm a bit confused. Currently in Ext 4.1 there are the following files:
    exts.JPG

    What are the differences?

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar