[lift-devel] lift setup questions ...

Gary King gwking at metabang.com
Tue Mar 4 17:48:07 UTC 2008


Hi Nicolas,

Thanks for looking at LIFT. I'm sorry that you ran into an unsupported  
feature and even more sorry that the error message printed is  
completely cryptic! the problem is that you are trying to use :run- 
setup :once-per-session and I've never gotten around to implementing  
once-per-session. You can, however, use :once-per-suite (which will  
run the setup _once_ at the beginning of the tests for the suite and  
the teardown _once_ at the end).

The per-session code isn't anything tricky so I'll try to make time to  
get to it within the the next week or so.

thanks,

On Mar 3, 2008, at 11:46 AM, Nicolas Lamirault wrote:

>
>
> hi,
> i would like to use lift with cl-selenium to perform unit test
>
> to launch and manage my website i use :
>
> (defparameter *website* (make-web-site 'ut))
> (start-website *website*)
> (stop-website *website*)
>
> how can i setup a unit tests suite which could contains all unit  
> tests ?
>
> i try this :
>
> (lift:deftestsuite web-test (main-test)
>  ((website (make-web-site 'ut)))
>  (:run-setup :once-per-session)
>  (:setup (start-website website))
>  (:teardown (stop-website website))
>  (:documentation "Unit Test web suite."))
>
> ;; Test selenium
> (lift:addtest (ovorost-web-test)
>  google-test
>  (:documentation "Test Selenium"       )
>  (let* ((selenium:*selenium-driver-url* "http://localhost:4444/selenium-server/driver 
> ")
>         (selenium:*selenium-session*
>           (selenium:do-get-new-browser-session "*firefox" "http://www.google.com 
> ")))
>    (selenium:do-open "http://www.google.com/webhp?hl=en")
>    (selenium:do-type "q" "hello world")
>    (selenium:do-click "btnG")
>    (selenium:do-wait-for-page-to-load "5000")
>    (lift:ensure (string= (selenium:do-get-title) "hello world -  
> Google Search"))))
>
>
> but i've got an error (ERROR \"not implemented\") and web site doesn't
> start / stop
>
> someone could help me on this feature ?
>
> thanks for any help.
>
> -- 
> Nicolas Lamirault
> _______________________________________________
> lift-devel mailing list
> lift-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/lift-devel

--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM







More information about the lift-devel mailing list