View topic - Automated Release Test



All times are UTC + 1 hour


Post new topic Reply to topic  [ 50 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Automated Release Test
PostPosted: 25 Mar 2012, 08:35 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
Basically a bunch of virtual maschines, testing the installation and networking of the release candidate. No actuall gametesting there besides the - does it get ingame. Every lobby gets 24 hours before release a "does-run-does not run" flag.

We got automated tests for the builds (which is actually most impressive) so i assume this can be done (not for all configurations of course, but the most comon ones)


Top
 Offline Profile  
 
PostPosted: 26 Mar 2012, 11:50 
Spring Developer

Joined: 31 May 2009, 23:08
most of it is already done here:
http://buildbot.springrts.com/waterfall

(see the validation test)

i already asked guys of zero-k, if they were interested in implementing in-game tests, but they had no interest to do so. maybe i asked the wrong guy, don't know.

see http://springrts.com/wiki/Regression_Testing for my plan.

Quote:
Every lobby gets 24 hours before release a "does-run-does not run" flag.


what does that mean? current lobbies don't allow to do run automatic tests, because they have no automatiation switches. afaik koshi works on that / his lobby-lib will allow to do such tests.

this is also how our current releases works: make release post, wait some time, if nobody complains: set it live.


Top
 Offline Profile  
 
PostPosted: 26 Mar 2012, 12:29 
Lobby Developer
User avatar

Joined: 14 Aug 2007, 15:15
I'll be able to automatically test unitsync usage, yes. I did already add tests in the python unitsync wrapper btw. Those just aren't plugged into anything.


Top
 Offline Profile  
 
PostPosted: 26 Mar 2012, 13:18 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
We are interested in making tests, we just dont know how.


Top
 Offline Profile  
 
PostPosted: 26 Mar 2012, 22:58 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
I already made an automated pathfinder test:

- Get Kernel Panic.
- Get this map
- Get this file or extract from Kernel_Panic_4.4.sd7 \Missions\KP\Script Exemple 3 - Pathfinder Test.txt
- Feed the file to Spring (as a startscript)
- Read results in infolog.

Here's what a successfully passed test should read like
Code:
[f=0000090] ÿ`ÿÿTrying to climb ramp...
[f=0000090] ÿ`ÿÿTrying to send nine atop...
[f=0000090] ÿ`ÿÿTrying to avoid wall...
[f=0000090] ÿ`ÿÿTrying to climb tower...
[f=0000633] ÿ`ÿÿSuccesfully managed to avoid wall!
[f=0001037] ÿ`ÿÿSuccesfully managed to climb ramp!
[f=0001522] ÿ`ÿÿSuccesfully managed to climb tower!
[f=0002740] ÿ`ÿÿSuccesfully managed to send nine atop!
[f=0003618] ÿ`ÿÿTime-Out!
The ÿ are just because for some reasons I wanted color in the ingame chat.

Many versions of Spring, such as 83, 84, 85, fails the last test about sending nine bits atop the tower through the twisted ramp.

Oh take a Spring version either higher or lower but don't use Spring 87, it crashes KP gadgets.


Top
 Offline Profile  
 
PostPosted: 26 Mar 2012, 23:36 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
But how do you interfaace tests with testing suite? what should the test output?


Top
 Offline Profile  
 
PostPosted: 26 Mar 2012, 23:44 
Spring Developer

Joined: 31 May 2009, 23:08
Licho wrote:
But how do you interfaace tests with testing suite? what should the test output?


Use Spring.Log() with errorlevel >= ERROR...

this will printf to stderror, all printed to stderror is seen as error / test failed.

so... some useful message would be nice.

@zwzsg:

nice! thats close to that what i wanted to do. i will soon try to run that test at the buildslave. i'm not sure if changes are needed, but its a nice start-off i think...


Top
 Offline Profile  
 
PostPosted: 27 Mar 2012, 02:02 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
I don't really understand what you mean with the /runtest 1 option.

I disagree about how you said "tests shouldn't rely on a specific map":
Spawning units, make them move, build, attack, reclaim, etc... all depends on the map.

I don't use Spring.Log (is that C ?) but Lua's Spring.Echo.

I suppose it would be cleaner if my test printed a failure message instead of having to detect a failure by not having a success message before the time out.


Top
 Offline Profile  
 
PostPosted: 27 Mar 2012, 03:24 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
and how do you run the test? can it be lua widgets? gadgets? how does it work?
does it update to laest mod?


Top
 Offline Profile  
 
PostPosted: 27 Mar 2012, 04:50 
Moderator

Joined: 19 May 2009, 20:10
zwzsg wrote:
I don't use Spring.Log (is that C ?) but Lua's Spring.Echo.

Spring.* is Lua (mostly).


Top
 Offline Profile  
 
PostPosted: 27 Mar 2012, 09:18 
Spring Developer

Joined: 31 May 2009, 23:08
@zwzsg:
i should have noted that all points on the wiki are debatable, its currently just a suggestion how it could work. Yeah, it seems like it depends on the map... i just wanted to not have this dependency if possible somehow.

for Spring.Log see changelog.txt or https://github.com/spring/spring/commit ... 390db3691c

and yes, Spring.Log is lua...

@Licho:
Quote:
and how do you run the test? can it be lua widgets? gadgets? how does it work?
does it update to laest mod?


my suggestion is the modoption "testsrun=1". it can be a widget and/or gadget that checks for this modoption. (thats also debatable...)


Top
 Offline Profile  
 
PostPosted: 27 Mar 2012, 09:42 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
ok that sounds good


Top
 Offline Profile  
 
PostPosted: 27 Mar 2012, 18:09 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
abma wrote:
and yes, Spring.Log is lua...
Ok. I was confused because you format your strings the C way. I guess I can make it use Spring.Log instead of Spring.Echo.

However I think the test should not just signal errors, but should also indicate when the test has run successfully. That way, when a bug is so severe the test doesn't run at all, you can detect the absence of a "test successful!" message, instead of believing all is perfect when in reality all is crashed.



abma wrote:
it can be a widget and/or gadget
Does spring-headless run widget?



abma wrote:
checks for this modoption. (thats also debatable...)
Instead of a single modoption I use a whole startscript so that:
  • More conditions are controlled, like the teams, the startpos, the other modoptions, making the test more repeatable.
  • What the test scenario do is described in almost readable text form in that script instead of being buried in the mod. You can read and change the test without remaking the mod.
  • You'd have to create a startscript anyway to run Spring.
  • But in reality mostly because I already had this mission system thingy coded.


Top
 Offline Profile  
 
PostPosted: 27 Mar 2012, 18:10 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
zwzsg wrote:
abma wrote:
it can be a widget and/or gadget
Does spring-headless run widget?
spring-headless runs everything it just doesn't render


Top
 Offline Profile  
 
PostPosted: 27 Mar 2012, 19:04 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
how far can a beheaded spring run? If every step saves a doomed pirate from the ropemakers daughter?


Top
 Offline Profile  
 
PostPosted: 27 Mar 2012, 19:09 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
zwzsg wrote:
abma wrote:
and yes, Spring.Log is lua...
Ok. I was confused because you format your strings the C way. I guess I can make it use Spring.Log instead of Spring.Echo.

However I think the test should not just signal errors, but should also indicate when the test has run successfully. That way, when a bug is so severe the test doesn't run at all, you can detect the absence of a "test successful!" message, instead of believing all is perfect when in reality all is crashed.
You can report those via Spring.Log too just use INFO level


Top
 Offline Profile  
 
PostPosted: 28 Mar 2012, 08:42 
Spring Developer

Joined: 31 May 2009, 23:08
i'm still thinking about how to start a test:

using a startscript for a test currently has the huge drawback, that, for each test, the engine has to be (re-)started.

also, somehow, the map has to be downloaded to run the test.

this is why i prefered the single modoption runtests=1 to run a test.

would it make sense, to create the folder "tests" in a game-archive, that contains script.txt's? fetching the map out of script.txt should be easy, it should be a grep for the line Map ...

only bad thing is, the game name has to be updated... maybe use some placeholder for that?


Top
 Offline Profile  
 
PostPosted: 28 Mar 2012, 10:41 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Test could also be a mission - specialized mutator ... you would download it from fixed URL and run it ..


Top
 Offline Profile  
 
PostPosted: 28 Mar 2012, 14:43 
Spring Developer

Joined: 31 May 2009, 23:08
Licho wrote:
Test could also be a mission - specialized mutator ... you would download it from fixed URL and run it ..


imo a mission is fine.

a fixed url is bad, because:
- it needs a (remote) service thats running to work
- bad for smaller projects, because they will have not control about the service
- bad to reproduce tests, if the service is down

also, this could be changed later. a solution, that works "offline" is more what we want here.

this is why i would prefer the data/script/mission (whatever) to be included in the game itself. this way its also easier to reproduce a failing test.


Top
 Offline Profile  
 
PostPosted: 28 Mar 2012, 15:43 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Well there is spring based general mission service
http://zero-k.info/Missions?featured=false

All missions there are always available through standard plasma service download.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 50 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.