I have a run.haml file where I run a test suit. Everything works just fine but I want to display the text "Starting test suite: #{params['run']}" immediately after user clicks the link that leads him to this haml.
the link clicked tells haml what suit needs to be executed
%a(href="run?run=#{file}")
Right now everything is displayed after the test suit run finishes. The run.haml page is being loaded till the script finishes.
- how does the haml processing flow work?
- can I start processing the job after the page starts rendering?
- can I display some text in a browser and then let call the test suit?
It takes minutes to finish the run of the test suit.
!!!
%html
%head
%title Running
%body
= "Starting test suite: #{params['run']}"
- output = %x[cd C:\\Program Files\\TestPro\\TestPro Automation Framework410 && ant -lib lib -f "C:\\Program Files\\TestPro\\TestPro Automation Framework410\\Output Files\\builds\\#{params['run']}.xml"]
-#The result is
%br
= output.split("\n")[-2,2].join("<BR>")
= "<br/>"*2
%a(href="/")back to suits list