Stendhal Quest Testing: Difference between revisions

Content deleted Content added
imported>Hendrik Brummermann
changed hudson link to always point to the latest version
imported>Kymara
No edit summary
Line 5:
{{Stendhal Quests}}
 
== Generate a chat log ==
We need chat logs of players doing each Stendhal Quest so that we can create tests for them. So, it's easy to help us because all you need to do, is do the quest and then save the chat log for us. There are some ways you can help us make the best possible test:
* don't say yes to everything immediately. try saying no and then come back and say yes
Line 12 ⟶ 13:
 
Some quests have already got a test written for them because chat logs have been provided. Please take a look at the report from [http://stendhalgame.org/hudson/job/stendhal_HEAD/lastStableBuild/cobertura/games_stendhal_server_maps_quests/? hudson] - quests which are all or mostly green are done, and quests which are all or mostly red need a chatlog provided.
 
== Run ChatTestCreator ==
Once you have the chatlog you can use games.stendhal.tools.test.ChatTestCreator to make a test. We assume you are using eclipse. First, copy the chat log into the project folder of your Stendhal project. For this tutorial we are using [[File:Test Gamechat.log]] - rename it if you want to follow the tutorial.
 
Open src/games/stendhal/tools.test/ChatTestCreator.java in the editor in Eclipse then go to the green arrow button for running an application.
Run Configurations ...
Arguments tab
Program arguments: gamechat.log
Click Run
 
If all is well you should get some text output into your Console starting with
<pre>
package games.stendhal.server.maps.quests;
 
import static org.junit.Assert.assertEquals;
import games.stendhal.server.core.engine.SingletonRepository;
</pre>
 
and it will be plain with no coloured highlighting.
 
 
== Trouble shooting ==
java games.stendhal.tools.test.ChatTestCreator chatlog.txt [chatlogtest.java]
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at games.stendhal.tools.test.ChatTestCreator.main(ChatTestCreator.java:75)
 
*You didn't put gamechat.log into the Program arguments.
 
Exception in thread "main" java.io.FileNotFoundException: gamechat.log (No such file or directory)
 
*You didn't copy gamechat.log into the project folder for your eclipse workspace.