tomgrill / gdx-testing Goto Github PK
View Code? Open in Web Editor NEWThis is a skeleton for libGDX projects which require testing with JUnit and Mockito.
License: Apache License 2.0
This is a skeleton for libGDX projects which require testing with JUnit and Mockito.
License: Apache License 2.0
Hey,
Is it possible to add test classes using the Intellij's Create Test dialog while using gdx-testing?
The issue I am having is that when I alt+enter on a class that I want to create test about and accept the test creation in the Create Test dialog, the test files gets added to the "core" project instead of the "tests" project which contains all of the other tests. I have tried to set the "Destination Package" as "de.tomgrill.gdxtesting.example", but this just creates the folder structure under "/core/src/de/..." instead of "tests/src/de..." where I assume it should be.
Have you thought about adding this as an option to the libGDX setup GUI? That would make it really convenient to use in rapid prototyping
Hi, I tried to test the game and the test fails. It fails when creating a SpriteBatch, namely in the compileShaders method.
StackTrace Error:
java.lang.NullPointerException
at com.badlogic.gdx.graphics.glutils.ShaderProgram.loadShader(ShaderProgram.java:209)
at com.badlogic.gdx.graphics.glutils.ShaderProgram.compileShaders(ShaderProgram.java:188)
at com.badlogic.gdx.graphics.glutils.ShaderProgram.<init>(ShaderProgram.java:171)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.createDefaultShader(SpriteBatch.java:162)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.<init>(SpriteBatch.java:126)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.<init>(SpriteBatch.java:80)
at com.badlogic.gdx.scenes.scene2d.Stage.<init>(Stage.java:100)
at com.mygdx.game.screens.MenuScreen.<init>(MenuScreen.java:24)
at com.mygdx.game.SimpleAndroidGame.create(SimpleAndroidGame.java:28)
at com.mygdx.game.screens.MenuScreenTest.setUp(MenuScreenTest.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at com.mygdx.game.ecs.components.GdxTestRunner.render(GdxTestRunner.java:43)
at com.badlogic.gdx.backends.headless.HeadlessApplication.mainLoop(HeadlessApplication.java:129)
at com.badlogic.gdx.backends.headless.HeadlessApplication$1.run(HeadlessApplication.java:96)
Would it be possible to update this project to junit5?
I'm not sure exactly what the problem is, I've added GdxTestRunner to my test project, used the @RunWith annotation, and my test is still generating an NPE when I try to load assets. I tracked the error to the headless backend internal filehandler. Before I installed your testrunner, the NPE occurred in the regular internal filehandler, not the headless one, so that much is clearly working. Is it possible that something has broken in/before 1.9.6? Or am I jsut doing something silly?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.