Page 1 of 2

FS19 - TestRunner Tool for Testing Mods

Posted: Tue Nov 24, 2020 3:01 pm
by Heizer
Tool for testing Farming Simulator 19 Mods
After a lengthy development and alpha-phase we are glad that we can finally release our first version of our Mod Testing Tool to you.

TestRunner_public.exe
  • checks a mod and shows various errors and violations of ModHub guidelines
  • provides test result as html and xml document
  • tests are structured in multiple modules/groups
  • tool is also used by our QA internally (with an extended feature-set)

Goals
  • speed up the process of testing mods by helping the modder to identify and fix problems (before submitting to ModHub)
  • detect various errors and provide hints how to fix them
  • ensure ModHub guidelines are met
  • improve performance and minimize overall mod file-size and memory usage

Key Features / What it does (selected examples)
  • check if the descVersion matches current patch level
  • check for xml parsing errors
  • warn about wrongly exported dds textures
  • warn about missing or obsolete files
  • show duplicate files (within the mod and with the base game)
  • provide information about shader problems, which need fixing for a console release
  • and much more, for detailed explanations see "Test Cases" section
  • all found problems will be provided in form of an HTML document and and xml file
    Example Result HTML

Requirements for using the tool
  • Farming Simulator 19 (min. version 1.7)
  • GIANTS Editor (min. Version 8.2.2)
    => the path to game installation needs to be correctly set within the editor
  • latest version of the TestRunner (0.6.3)

Disclaimer
  • the tool is still in beta status, some tests might show errors which are none (so called "false positives")
    particularly "unused files" reported by module "ObsoleteFiles"
  • please report any cases where you think the tool outputs errors which are false positives
    when making a bugreport please include testrunner log, the result files (xml and html) and if possible the mod itself (or its id on the ModHub), so we can reproduce the issue
    ideally use the "TestRunner" project on our public Bugtracker for reporting any bugs

Instructions / How to use
  1. drag and drop the directory of an unzipped mod onto TestRunner_public.exe
    • note: folder of the mod does not have to be in the same directory as the TestRunner
    • a command-line window will open displaying current progress
    • if something went wrong an error message is displayed giving details on the problem
      all outputs are also saved in the "TestRunner.log"
  2. if requirements are met the tool will start to analyze the mod
    • the command line will display some information on the current progress
      unless there is a "critical" message, this can be ignored
    • GIANTS Editor will be automatically opened and closed during the process
    • note: depending on the size of the mod and the speed of the hard drive the process may take several minutes
  3. when the test process has finished, the message "Finished execution" will be displayed inside the command line
    • a xml and html file will be generated in the same directory as the TestRunner
    • files are named after the directory name of the tested mod and contain the result of the test
      • html file only contains all the found errors (per module)
      • the xml contains all errors and more detailed (meta)information
  4. the generated html file will be automatically opened in your browser where you can check if errors were found in your mod
    • errors are outlined in red
    • explanations are in italics
    • instruction on how to correct errors are colored green


Test Cases and explainations

In the following the individual modules and their test cases are explained in detail
Work in Progress
  • xml-file well-formedness (only required by the game to a certain extent, but should be fulfilled nonetheless)
  • Module DXTCheck: ensure dds files use correct DXT formats, suggest conversion to DXT1 where possible
  • Module MipMapCheck: ensure textures for 3D objects have MipMaps, warn if UI overlay textures have MipMaps, warn if texture has too low resolution
  • Module TextureCheck: ensure textures have a resolution of 2^n
  • Module I3DCheck: check reference integrity, obsolete lights/cameras, textureArray usage
  • Module ModDescCheck: check a set of ModHub guidelines (descVersion, version number format, changelog, localization, ...)
  • Module VehicleCheck: ensure specific vehicle xml elements are present (e.g. "washable") or absent (e.g. "dailyUpkeep" in vehicles)
  • Module SlotCheck: calculate estimated number of used slots for each store item as a reference for the modder
  • Module ObsoleteFiles: list obsolete source files not loaded by the game, list possibly unused textures, list duplicate files
  • Module EditorCheck: load all i3d files contained in the mod and check for errors
  • Module ShaderCheckEditor: warn if custom shaders are present in the mod nullifying console compatibility, raise errors if material configurations are used which are not available in the shader cache

Troubleshooting
  • problem: game installation can not be found
    • reason: tools checks default install location and reads location from registry, make sure you didn't move the game after installation
    • solution: run in cmd (see instructions below) with argument -g <pathToGameInstallation> to manually set the path
      Image
  • problem: editor installation can not be found
    • tools searches for installed Giants editors in giantsPackageRegistry xml located in appdata/local
    • solution: run in cmd (see instructions below) with argument -p $FS19_EDITOR$ <pathToEditorExe>
  • problem: program closes down by itself/crashes
    • post/send TestRunner.log, if possible send the tested mod in a private message
    • if possible, run the tool from command line and add "--verbose" as an argument and send us the log
      this way more information will be included in the log-file and help us with debugging process


Instructions for using with command-line (cmd)

if you need to make additional settings (e.g. game installation cannot be found), you can run the tool from a commandline
  1. start a command-line or powershell window
    • Option A: click the address bar of the windows explorer window, type "cmd", hit enter
      this will open a command-line at the current directory of the explorer
    • Option B: hold shift and right click the background of the explorer window, select "Open Commandline window here" or "Open PowerShell window here"
      this will open a command-line/powershell at the current directory of the explorer
    • Option C: Press "Win" + "R", type "cmd" in the dialog, hit enter
      this will open a command line in your user profile
      => navigate to the location of the TestRunner_public.exe
  2. type "TestRunner_public.exe" ("./TestRunner_public.exe" for PowerShell)
  3. hit space and enter the path to your unzipped mod, e.g. "E:\mods\FS19_kirovetsK700A"
  4. Optional: add additional arguments if required/desired
    Image
  5. hit enter to start the test tool

If you find any bugs I suggest to report them on our public Bugtracker, as its more efficient to manage them there.
We are looking forward to your Feedback and hope the tool will support you creating mods and submitting them to ModHub.

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Wed Nov 25, 2020 7:04 pm
by w33zl
Great news! I've been thinking of developing something similar myself :) If I got a suggestion or feature request, should that be registered in the bugtracker as well?

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Wed Nov 25, 2020 7:51 pm
by derSchreiner
Hi w33zl, we have planned more features, but feel free to add a feature request at the bugtracker

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Wed Nov 25, 2020 10:04 pm
by Cubic Dogg
Does this work for consoles aswell or just PC

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Wed Nov 25, 2020 10:28 pm
by yumi
Thanks Giants. That's great news and I hope it will help you spending more time on real quality testing when this first step is done by the modder himself.

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Wed Nov 25, 2020 11:09 pm
by SechzgerHiase
:hi: very usefull tool, its fun to test with it :gamer:

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Thu Nov 26, 2020 11:37 am
by Mantrid
Great stuff. A few times I've submitted a mod and it's failed with a basic error that made me wish you'd release the script/program you were using to find it. Well done :)

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Thu Nov 26, 2020 2:46 pm
by adr0102
i don't know how i can install testRunner and use cmd

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Sun Nov 29, 2020 5:44 pm
by #MB-Trac_Power
Thank you!


With friendly regards
#MB-Trac_Power

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Thu Dec 03, 2020 2:15 pm
by TopAce888
adr0102 wrote: Thu Nov 26, 2020 2:46 pm i don't know how i can install testRunner and use cmd
Just drag and drop the mod folder over the TestRunner_public.exe.

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Thu Dec 10, 2020 1:35 pm
by cwattyeso
So tried to use this tool today and have run into the issue with the tool not recognising or finding the path to the game or the editor on my PC, because I have installed both the game and the editor to non-default drives and paths. I see the instructions above for doing this with cmd line or powershell but I'm still having issues with this. Is there no easier way, maybe through a separate config file that the TestTool could have users set their paths to the game.exe and editor.exe and have this saved permanently so they don't need to keep launching with cmd line or powershell and adding arguments everytime they want to use the tool?

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Thu Dec 17, 2020 12:56 pm
by Eische
cwattyeso wrote: Thu Dec 10, 2020 1:35 pm So tried to use this tool today and have run into the issue with the tool not recognising or finding the path to the game or the editor on my PC, because I have installed both the game and the editor to non-default drives and paths. I see the instructions above for doing this with cmd line or powershell but I'm still having issues with this. Is there no easier way, maybe through a separate config file that the TestTool could have users set their paths to the game.exe and editor.exe and have this saved permanently so they don't need to keep launching with cmd line or powershell and adding arguments everytime they want to use the tool?
Did you try to put the command line into a batch (.bat) file?
You can basically put all above mentioned steps (navigating to testTool folder, ...) into the .bat file.

Later on you can simply change the path of your mod and doubleclick the .bat file. Never tested it, but should work.

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Wed Dec 30, 2020 9:50 am
by Mantrid
cwattyeso wrote: Thu Dec 10, 2020 1:35 pm I see the instructions above for doing this with cmd line or powershell but I'm still having issues with this. Is there no easier way
There is. Right-click copy the exe, then paste shortcut somewhere blank. Then right-click the new shortcut and go to properties, and add the flags in the "Target" part (on the "Shortcut" tab), after the command. It works, so you can just drop the mod folder onto the new shortcut you made :)

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Tue Jan 19, 2021 1:37 pm
by Peppe78
I have created a video tutorial on the testRunner to help all modders who still don't know its potential. I hope it will be useful.



Edit don_apple: fixed YouTube link.

Re: FS19 - TestRunner Tool for Testing Mods

Posted: Mon Jul 26, 2021 6:41 pm
by Swilley86
this test runner tool is a joke ive gone through all the trouble shooting step by step and nothing works just keeps telling me file paths dont exist