Search Unity

Easy testing suite

Discussion in 'Works In Progress - Archive' started by WiLLyRS, Sep 24, 2012.

  1. WiLLyRS

    WiLLyRS

    Joined:
    Jul 4, 2012
    Posts:
    8
    Hi guys, I'm developing a little script for making the debugging and testing of our application easier! I would like to know what you think and maybe I can think to make it better and put it in the asset store...
    Well, for now my script will save the last 5k characters of log and stacktrace, substituting things like "UnityEngine.Debug:Log(Object)" with "obj-", "UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)" with "corout-" and stuff like that to save character space (this is intended for a database storing, that's why the char limitation). There is an option to make the script not save the stack if you don't want to.
    Then, with a button press, the script will:
    - Send a "PauseEverythingForDebugLog" message to the attached script (optional) to make you pause the game while the log is processing
    - Save a screenshot of the game at the moment of the button press
    - Now, you are able to draw on the screen (for now with just one colour), for enlightening the bugged part of the game
    - Pressing "next" will save the drawing and open a text window for adding other information
    - Pressing "upload" will send all the informations to the url given with the POST method

    The parameters editable via the inspector are:
    -App Name: The name of the application, it is send via the POST message too
    -Url: The url of the server
    -Pause Catcher: the gameobject containing the pause script (optional)
    -Some GUI information

    After that, you can threat the post information as you want. In my case I'm storing the value in a database and display them in a php page.

    Example of in-game debugging:
    found a bug:
    $01.png
    draw:
    $02.png
    add information:
    $03.png

    Now, the php page (extern link because the images are big)

    Application list based on the App Name
    List of the bugs of that application
    Bug info
    Resulting Image

    I hope you like it, every comment is welcome :D