Get help with testing, discuss unit testing strategies etc.


Post by minho »

Hi,

The current Phantomjs provided requires a server up hosting the test harness. However, is it possible to able to support running Phantomjs without having the server up and purely relying on the files?

Post by mats »

Using Phantom 1.4 this should be possible but we haven't yet tried to use it: Please see: https://code.google.com/p/phantomjs/wiki/ReleaseNotes

Post by minho »

Thanks for the information.
We are looking for an way of unit testing our application as part of the build process. We are very interested in knowing if you are considering the automated unit testing during build time for the future.

Post by mats »

Sure, we're definitely aiming at supporting the major CI tools out there. Which tools are you using? Have you found any major issues so far?

Post by minho »

During the build time, our server is not up. However, we want to execute unit tests for our front-end components mostly written in Extjs. Currently this is not achievable through Siesta since Siesta requires a server up before the testing. That was the reason why I started this question. I was looking for an way of testing not through http, which although limits testing for only NON-XHR because Cross origin requests are only supported for HTTP. One way that i can think of - opening the test-harness.html by accessing file directly (c:/..../test-harness.html) and invoking the StartTest function for the each test file. Is this possible? I could not tell how each testing is invoked when looking at phantomjs.bat file.

Post by nickolay »

What tool do you use for building? Is it some shell script or something like Jenkins? Does your web server reside on your dev machine? You can install local web server on your machine.

Post by mats »

Nick, how about supporting filesystem ajax like we do for the scheduler trial pack?

Post by minho »

We are using ant for building our application. When developing i am using my local web server. However, we don't want this web server dependencies while building especially through our cruise control. QAs also does not need to know and they might just need to run automated script, which triggers testing without worrying about web server at all.

Post by nickolay »

I guess, if you will allow XHR requests to file system (somewhere in about:config) in browser config that should also work.

Post by minho »

It sounds like something that I could try out. Where is that config in the browser? If the config is in the browser, how do I set it through phantom?

Post Reply