Giter VIP home page Giter VIP logo

msporna / lava-test-coverage Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 3.0 27.84 MB

Test coverage tool supporting unity games (c#), android apps (java) and javascript. Gathers coverage on the fly, as software is being tested.

Home Page: https://msporna.github.io/LAVA-test-coverage/

License: MIT License

Python 12.15% Batchfile 0.01% JavaScript 5.45% CSS 0.64% HTML 80.95% C# 0.47% Java 0.33%
test-coverage code-coverage selenium-test-coverage unity-test-coverage selenium unity3d flask android-test-coverage runtime-coverage

lava-test-coverage's Introduction

WHAT IS THIS?

This is a test coverage tool that is intended to work with black box functional tests. It does not matter what language your tests are written in or if you perform manual testing instead of automated. Source code of app under test is modified to contain probes (and then it's compiled along with them) that report back to LAVA's backend which processes the statistics. It gathers coverage stats on the fly, as app is running and testing is being done.

The tool is aimed for QA engineers that want to see what % of the tested app's code their functional tests cover.

More on how it works here

FEATURES

  • measure how much code of application under tests was executed by testing activity (manual or automated)
    • it can be done for:
      • Unity3D games (c#)
      • Android (Java) apps
      • Javascript web apps (vanilla)
  • web based dashboard for viewing coverage reports and managing coverage sessions
  • html report is automatically saved to drive after each coverage session and can be easily shared
  • exposed rest API allows easy integration with any CI tool
  • source files are instrumented automatically
  • detected source files are grouped into modules - gather coverage only for source files relevant to test session
  • view timeline of code execution - see sources & executed lines sorted by execution time
  • assign tag, owner and build number to the coverage session to relate it to the build being covered and easily integrate with your existing CI process
  • view total coverage for specific build within specific release and see if your testing improved from build to build

setup report report executed_lines

DOCUMENTATION

--> Getting Started

Head over to the Wiki section for more.

Article on how to get it running with a sample Unity3D game: Treasure hunting in video game testing: a tale about using a test coverage tool with Unity3Dā€¦

TRY IT IN THE BROWSER

WEBGL UNITY GAME

I prepared a webGL game that simulates the tool and allows you to see how it works directly in your browser

You can play it here: https://msporna.github.io/LAVA-test-coverage/lava_game/

It's just a simulation to give you an overview. Note that the game shows version 2 of the tool which varies slightly from the most recent version.

gameplay_gif

EXAMPLES

There are 3 examples available:

  1. getting test coverage for unity game
  2. getting test coverage for java Android app
  3. getting test coverage for a js web app(+selenium,robot framework,python tests)

CURRENT VERSION

3

lava-test-coverage's People

Contributors

msporna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lava-test-coverage's Issues

IndexError: list index out of range, cause unknown

Particular scripts in my project are causing the formatting process to throw an error.

I believe it's caused by scripts using these calls:

StartCoroutine(Util.RoutineTimer.WaitForFrames(1, () => {
                            //do logic
		}));

Util.RoutineTimer.WaitForFrames:

public static IEnumerator WaitForFrames(int frames, Action callback)
		{
			for(int i=0; i<frames; i++)
			{
				yield return new WaitForEndOfFrame();
			}
			callback();

		}

Gives me the following error when formatting the file with the above call:

Traceback (most recent call last):
  File "D:\Programs\LAVA-test-coverage-master\client\instrument_client.py", line 922, in <module>
    instrumenter.prepare(json_path)
  File "D:\Programs\LAVA-test-coverage-master\client\instrument_client.py", line 172, in prepare
    self.insert_instrument_function()  # to js or source files
  File "D:\Programs\LAVA-test-coverage-master\client\instrument_client.py", line 601, in insert_instrument_function
    self.insert_instrument_function_into_csharp()
  File "D:\Programs\LAVA-test-coverage-master\client\instrument_client.py", line 642, in insert_instrument_function_into_csharp
    1]
IndexError: list index out of range

It works fine when trying it with folders that don't contain these scripts.

Documentation on API usage

I am trying to automate the process through unity test runner command line combined with lava.

i did able to do unity test runner with lava through using coroutine to wait till lava request are sent to server. (which i think isnt ideal for my case tbh.)

for now i just try to automate UI i needed to apply in lava dashboard so i wont need to set things up like, module, and assgined files.

so i ended up looking at server code and find out that most of the stuff are done through api call. but there are still no api documentation for it which troubles me figuring stuff out since i never developed flask before.

i do could try using api call for each stuff but it isnt clear enough

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.