Code Monkey home page Code Monkey logo

Comments (6)

timcassell avatar timcassell commented on August 27, 2024 2

Yes, I'm doing that, but is it possible to make the imported functions works ? My tests are written to test them. I mean, is it possible to run the tests on the browser like Unity does by default ?

See the comment I linked earlier.

from unity-test-runner.

timcassell avatar timcassell commented on August 27, 2024

What does your yaml look like? How are you running WebGL tests? Unity test runner doesn't support platform tests outside of the editor. See #163 (comment)

from unity-test-runner.

theomonnom avatar theomonnom commented on August 27, 2024

The workflow looks like this:

name: UnityBridge Tests
on: [push, pull_request]

jobs:
  run_tests:
    name: Run Tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          lfs: true
      - uses: game-ci/unity-test-runner@v2
        id: tests
        env:
          UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
        with:
          customImage: unityci/editor:ubuntu-2021.2.18f1-webgl-1.0.0
          projectPath: TestProject~
          testMode: playmode
          githubToken: ${{ secrets.GITHUB_TOKEN }}
      - uses: actions/upload-artifact@v2
        if: always()
        with:
          name: Test results
          path: ${{ steps.tests.outputs.artifactsPath }}

By running the tests in the editor, I simply mean that I click on the "Run tests on WebGL" button to launch my browser. ( On Window > General > Test Runner )

from unity-test-runner.

timcassell avatar timcassell commented on August 27, 2024

When you run the tests in play mode from the editor on your machine (not in webgl), does it fail the same way?

from unity-test-runner.

timcassell avatar timcassell commented on August 27, 2024

For extern methods like that, I usually wrap it in #if UNITY_WEBGL then make a mock method in the #else so that other platforms won't explode. In your case, the test runner isn't compiling for webgl and running the js code, it's just running in editor. So if you're getting the same error on your machine in play mode, that's why.

from unity-test-runner.

theomonnom avatar theomonnom commented on August 27, 2024

Yes, I'm doing that, but is it possible to make the imported functions works ? My tests are written to test them.
I mean, is it possible to run the tests on the browser like Unity does by default ?

from unity-test-runner.

Related Issues (20)

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.