-
Notifications
You must be signed in to change notification settings - Fork 715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If verbose via slim.flags -v, then popup window that shows slim instructions. #1469
base: master
Are you sure you want to change the base?
Conversation
Hi six42 , |
Hi Paul, What are for you the "slim instructions" and the "FitNesse Commands". Can you give an example? To get StdOut in your TestPage output you can do this:
This still might break the HTML page created because
|
Hi six42, A Fitnesse command is You describe how "To get StdOut in your TestPage output" , but that would interleave slim instructions with Fitnesse table results, and would be messy, I guess. Can you comment on the code that I wrote as part of this pull request ? Kind regards, |
Hi Paul, you can see the FitNesse commands in "near realtime" on the wiki page if you run the test from the wiki. I initally thought that you wanted to better understand which java functions are currently called. Looks this is not your goal. Please explain what your real problem is and what you ideally want to achieve. Maybe this is possible and you don't have to live with the workaround of showing instructions. |
Hi six42, I want to see each command as it is being executed. Only once the table is complete, is too late; some tables have many commands, and you have to wait a long time before you get feedback. I'm not interested in the java functions called; I want to see the commands (i.e. lines) from a script as they are being executed. Surely, it's not a strange feature to want. |
|
@fhoeben Two other considerations:
Pointers to example programs, Fitnesse class files, or relevant documentation, are welcome. |
Hi Paul, The end result doesn't looks as useful to me as expected. What is your view? This Video shows that the execution is in normal cases too fast and nothing is really visible: FitNesse_StepByStep.mp4In this Video I added an extra delay of 500 ms after each instruction to see the effect: FitNesse_StepByStep_slow.mp4General Instructions: Examples: |
Hi six42 , The approach that you demonstrate above, requires much more detailed knowledge of the Fitnesse source code. The approach that I used in my pull request, is simpler: The slim instructions are shown in a separate window, and the existing run log window is unchanged. I'm trying to come up with an implementation showing the instructions via a webbrowser instead of via a Swing window, just as fhoeben requested. I'm planning to use HTTP chunked transfer encoding ( https://en.wikipedia.org/wiki/Chunked_transfer_encoding) , which is also what Fitnesse uses for it's run log browser window. You write
I like the table being shown, and that it is being updated as instructions are run. The slim instructions at the top are only very briefly visible, though. The "Instruction {id='NOOP'}" stays visible long enough for me to be able to read it, but the instructions that call a method, are gone very soon. They don't scroll ; if they would, they would remain visible. For a moment, I thought ... "Who needs to see the current slim instruction, when you can see in the Fitnesse table in the run log where the script currently is executing?" . But I think the current slim instruction is the best thing to show: the table in the run log is only updated with the color for the line just run, after the line has finished executing. And if the line is collapsed, it may represent many slim instructions. |
@fhoeben
I now know how to implement doing it via a browser window. It's a bit more complex than the Swing solution. I haven't made that code available yet, because I don't know how to implement And how should I make the code available? As a new pull request , or as changes to the current pull request? I know how to do the former, the latter I'd have to find out. Currently I have the port that the browser must connect to, as in localhost:<port> , hardcoded to 3456 . I don't know how to implement the separate option that you mention; I think that would be a command-line option to specify the port for the browser. |
Hi Paul, a different thought. To try it, add this to any test page: Define than your own class to customize the output to your needs. |
Hi six42, Interesting possibility, using my own fixture interaction class. |
If slim verbose is enabled, then popup Swing window that shows slim instructions as they are executed.
Enabling verbose is either via
!define slim.flags {-v}
or via
path.of.test.script?test&slim.flags=-v
The slim.flags -v option is an existing option. Up until now it only wrote the slim instructions to stdout, and they were shown in Execution Log after the script finished.
Maybe its better to have a separate slim.flags option, for example -slimview , to show the Swing window.
Maybe its better to have a SlimListener interface, and static method ListExecutor.addSlimListener , to not have Swing code called directly from within ListExecutor.
I'm happy to receive any feedback on this.