Weekely Report : Week 8-9

Hi everyone!,

Here is a brief summary of my work last week.

I started with implementing progress bars, now the progress within a testsuite and the overall progress are reflected by two text lines of form (X of XX tests), In addition the progress within a testsuite is also shown graphically as progress bar, which gives a cool look ;).

Next I moved on to some more improvements in GUI as suggested by Eugene. There existed a button to select all tests at once but no such button to do the reverse. This was balanced by making the same button do both the jobs, i.e if number of selected tests is more than deselected ones, it shows “Deselect All”, “Select All” otherwise. Other improvements included, modifying the GUI texts, and some formatting.

Next, their were tests which when ran in interactive mode showed no activity, code was added to make them display the information about what they are working with.

Finally, I started on enabling the testsuite and test selection using a config file. Initially, I rolled out my custom implementation to read and parse config files, later i figured out that this could also be done using the ConfigFile class. So I switched my implementation to make use of that class.
Now we have a layout-like this:

[Global]
# Global-parameter-name value pairs here
isSessionInteractive=true
[Testsuite]
# Decides if testsuite itself is enabled or not
this=true
# Tests within the testsuite go here
dummyTest=true

This does two useful things:

  • It saves your configuration each time you customize and remembers it, so that you don’t have to customize every time if you needed a particular customization.
  • One can also manually edit t his file to affect exactly which tests of a particular testsuite be executed.

Next, I also worked on writing a testcase for cursor-trails in GUI bug.
The problem was if the shake offset is set, and then GUI is shown, cursor leaves trail in GUI and its very difficult to click any button. I first reproduced this problem which quite ended up as a test for it.
I have an offset of 25 pixels set and I then prompt GUI dialog to verify if the user sees a trail or not, If there are no trails, user will probably click the “No” button on right, if there be trails, clicking any button would be difficult and user may end up pressing “return”, which is interpreted as “Yes” i.e trails were there.

Finally towards the end, I enabled the logging feature.
Now testbed outputs are logged with more details, and are also produced on stdout with lest explicit details.
One can provide his own logDir/logFile, by default log files are “testbed.log” produced in game-data directory.

Next week I plan to take on sound subsystems. This is probably the last subsystem to be tested.
I want to do all this quick so that I could get some time to modify things as mentors want them to ;).


Neeraj

Weekly reports (Week 7-8): Testbed Usability Improvements

Hi everyone.

The midterm results were announced last week and I passed, yay!.
Thanks to my mentors Eugene and Jordi for their valuable guidances and advices.

Now, some updates on my last week work:, Last week I mostly happened to work on the GUI, however i had planned some more things but the gui thing took most of the time.
I started with implementing testsuite selection using checkboxes in the initial few days.
Later it happened that as the checkboxes are not dynamic, i.e they are not scrollable when the number of testsuites increases.
So I needed to shift to some other widget, ListWidget was the closest choice.
The selection and deselection was implemented using fading and darkening of text, and addition of some extra text.
This consumed quite much time, as I needed to first figure out how the GUI dialogs work and then move with my work.
Finally, I shifted all the configuration related stuff to a class, TestbedConfigManager.

I am now thinking of working on with testsuite skipping, progress bars on monday(tuesday) and then for a change move on to Sound Subsystems, so that all the basic testsuites are completed as soon as possible.

I would be updating with more details on how I plan to take on Sound subsystem after I discuss it with my mentors.


Neeraj

GSoC with ScummVM : Weekly report (Week 6-7)

Hi everyone,

Here are some updates on my project and how I have been coming along.

Last week I mostly worked on refactoring and features suggested by Eugene. I started up with the Event stuff, the code now handles the RTL and quit events, and one can safely exit testbed, even if not all the tests are completed. Besides the keyboard events were completed as well.
Next I moved on to drawing rainbow palettes and rotating them, after doing some search over it, i figured out that rainbows are basically drawn on HSV scale by varying the hue from  0 to 360 degrees and keeping saturation and value constant at 1.
The algorithm for the conversion was available at wikipedia, although I needed to do some scaling so as to suit to my requirements. I scaled the 0-360 range to 0-254, as the remaining two colors are fixed for background and foreground respectively. Finally, I ended up with a couple of good-looking rainbows.
The rotation code was later modified to adapt to this change.

After this was done, I moved on to detection corrections. The detection code was switched to advanced detector.
Now if game data files are not found, the code leaves a warning for the data files and can continue normal execution skipping the FS tests.

Lastly, I moved on to scaling corrections. In scaling, to establish the correctness of scaling implementation, what I did was, say I have a cursor with target scale ‘x’, now if the game data is scaled by factor ‘y, > x’, then the scaler would scale the cursor as well by factor of  ‘y/x’. Based upon this relationship, I devised a method to calculate an estimated rectangle which when scaled would fit the cursor. So if the rectangle fits the cursor, the implementation holds correct, incorrect otherwise.

This happens to be all from this week, however i expected more out of it, but just got stuck at some point and that consumed some time. However, as the midterms are nearing, I plan to continue the refactoring stuff next week too, so that I can get done all the features Eugene wanted me to have in. Next I can then safely move to audio subsystem.

Stuff for next week:

  • Usability improvements: Selecting tests with checkboxes, skip a test, Progress bar.
  • Specific test improvements: Extend dialogs to make them timed, test stats at end, rerun the tests, logging improvements
  • Code Improvements: document functions in doxygen recognized format, a scan of code to make it adhere to CFC.

That happens to be all. I hope I get all of this done by next week :D.

GSoC with ScummVM : Weekly Report (Week 5-6)

Hi everyone,
Once again its time for some update on my work. Here is a brief summary :

  • Being done with the Save games test, I moved on to testing miscellaneous features, which include Mutexes,timers, Date time and events.
  • Testing datetime was straightforward, get the date calculated from the backend, verify that it increases fine by putting delays, and if the session is interactive, display the date and verify directly with user.
  • Testing mutexes was a bit complicated, It is not always possible to generate a situation in which an incorrect mutex implementation fails, However, I came up something like this:
    Took to shared variables: first and second.
    <Critical Section>
    first ++;
    delay(2)
    second *= first
    </Critical Section>Here, the output depends upon whether the mutex behaves correctly or not, additionally based upon my observations I had also added couple of checks which minimize the situations in which an incorrect implementation would get through.
  • Testing timers was a bit easy too, I passed a static var to the timed process, and verified whether the callback function works fine by checking the value of that variable.
  • In the meantime, I did some work on improving the code as suggested by eugene and jordi, there are no printfs anymore in the code. I have also added the code so that data gets written to the log whenever we want, If there is no logfile, outputs are put on stdout.
  • One more thing I added was, that the engine putting up a list of testsuites to execute, this is now handled in a better manner than previous.
  • Finally I moved on to events, Mouse events were easy to implement, but I was almost stuck with the RTL event (ctrl+f5) for almost a day or two, what happened was whenever I press (ctrl+f5), the code crashed with message “could not load widget GlobalMenu.help”.I thought I found a bug :), but after hours of debugging and examination of the code in GUI and themes, I finally figured out that the newer scummvm binary requires an updated theme_layout.stx, while it was using the previous one from “/usr/share/scummvm” and hence the problem, When I changed my theme path to “scummvm/gui/themes”, all worked fine :-). Finally I did “make install” to update the copy in “/usr/share/scummvm/”.
  • For keyboard events, what I tried to do was, make user type some word input, we would display the word on screen, and make the user verify them. I have committed some code on it yesterday but needs some more rework.
  • Fianlly the events RTL and QUIT would be handled, they will enable the testbed to exit even if all tests are not complete.

So that was all from the week, This week I have planned to :

  1. Done with all the event stuff (Sunday).
  2. Refactoring as suggested by Eugene (Monday-Saturday)
    — Rainbow palettes (Monday)
    — Possibility to go forth and back in tests/ skip some tests. (Tuesday-Wednesday)
    — Show test number and progress bar (Thursday – Friday)
    — Improve the scaling test and detections (Saturday)

The only tests that remain now are of audio/audio cd/ Midi subsystems. Once the refactoring stuff is done, I shall be ready to step into those. Additionally If the mentors have any input or feature (they might want to see), please drop me a mail and I would be glad to include that in.

Cheers,