Thread: Why do RSPS bases not have automated tests

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Why do RSPS bases not have automated tests 
    Registered Member Rachmaninov's Avatar
    Join Date
    Sep 2017
    Posts
    39
    Thanks given
    11
    Thanks received
    6
    Rep Power
    11
    I'm curious, why do the majority of private servers bases have no (or very little) unit and integration tests? 98% of sources in the downloads page have no automated tests whatsoever. Apollo-rsps only has a very small number of unit tests for things like the inventory logic and the packet buffer. But lots of things remain without automated tests.

    Is a large test suite not needed? I'm not sure but I think they are needed in private server bases; while making changes to the game logic, you could unknowingly introduce bugs that could have otherwise been caught with a test suite. E.g. dupes in a trade system.
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Aug 2010
    Posts
    3,174
    Thanks given
    1,724
    Thanks received
    2,002
    Rep Power
    3837
    It would be the largest time-waste ever to try and write unit tests for a server that was not originally written from scratch.
    If you're writing your own framework and building the server from the ground up, sure you could do unit tests, but other than that it's going to be virtually impossible to go through the dumpster fires in the download section and write unit tests for the content that is in them.
    Reply With Quote  
     

  3. #3  
    Renown Programmer
    Greg's Avatar
    Join Date
    Jun 2010
    Posts
    1,179
    Thanks given
    260
    Thanks received
    1,012
    Rep Power
    2003
    RSPS bases don't have unit tests due to their lifecycle. A kid comes along, picks up a base, modifies it until content until a few years later releases it back into the downloads section, where another kid picks it up, ad infinitum.

    If a developer, someone who knows about unit testing and best practises comes along, they don't touch the downloads section with a barge poll and instead start their own framework.
    Attached imageAttached image
    Reply With Quote  
     


  4. #4  
    Why do RSPS bases not have automated tests



    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    30
    Posts
    16,307
    Thanks given
    7,215
    Thanks received
    12,308
    Rep Power
    5000
    The apollo team are actively accepting PRs that increase test coverage.

    Unlike most servers, they have integrations with services like SonarCloud to identify issues with code quality, bugs, and vulnerabilities. You can see an example of that report on a commit like this.

    They also run all of the automated tests that are present on every change.


    Quote Originally Posted by Hank View Post
    It would be the largest time-waste ever to try and write unit tests for a server that was not originally written from scratch.
    Hard disagree. One of the overarching principles in Working Effectively with Legacy Code is adding test coverage to existing systems so future refactoring can occur with the safety of ensuring you preserve the existing behaviour.
    Last edited by Scu11; 04-22-2020 at 02:50 PM.

    Attached image
    Reply With Quote  
     

  5. Thankful users:


  6. #5  
    Registered Member Rachmaninov's Avatar
    Join Date
    Sep 2017
    Posts
    39
    Thanks given
    11
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by Greg View Post
    RSPS bases don't have unit tests due to their lifecycle. A kid comes along, picks up a base, modifies it until content until a few years later releases it back into the downloads section, where another kid picks it up, ad infinitum.

    If a developer, someone who knows about unit testing and best practises comes along, they don't touch the downloads section with a barge poll and instead start their own framework.
    i might write a framework (purely for educational purposes) once my finals are done .
    Reply With Quote  
     

  7. Thankful user:


  8. #6  
    Community Veteran

    Animato's Avatar
    Join Date
    Apr 2007
    Posts
    2,011
    Thanks given
    18
    Thanks received
    80
    Rep Power
    253
    The value proposition of unit testing is and always will be hotly debated, it shouldn't really be that surprising that any software does or does not have tests.
    Reply With Quote  
     

  9. #7  
    Renown Programmer
    Greg's Avatar
    Join Date
    Jun 2010
    Posts
    1,179
    Thanks given
    260
    Thanks received
    1,012
    Rep Power
    2003
    Quote Originally Posted by Jake_ View Post
    The value proposition of unit testing is and always will be hotly debated, it shouldn't really be that surprising that any software does or does not have tests.
    Is it really though? The benefits of unit testing are pretty uncontested. I will admit context matters; writing a script to do a quick job? probably don't need unit tests. Being anal about making sure code has a 100% coverage also has diminishing returns. Writing bad code and bad tests for that code? Probably hard to add value to something that has little value in the first place.

    But we're talking binary here, tests or no tests. Any number of unit tests is extremely beneficial to an application as complex and interconected as an MMO game.

    The number of dupes that would've been avoided if people only unit tested their container systems is probably laughably high.
    Attached imageAttached image
    Reply With Quote  
     


  10. #8  
    Registered Member Rachmaninov's Avatar
    Join Date
    Sep 2017
    Posts
    39
    Thanks given
    11
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by Jake_ View Post
    The value proposition of unit testing is and always will be hotly debated, it shouldn't really be that surprising that any software does or does not have tests.
    lots of produced software have unit tests these days. it would be very difficult for me to think of an open-source product produced by one of the big tech companies (FAANG) that doesn't have any unit tests.

    nonetheless, i think they can become a net negative if the dev culture gets incredibly hung up on maximizing coverage criteria to the point where actual development suffers.

    "I had a client in northern Europe where the developers were
    required to have 40% code coverage for Level 1 Software
    Maturity, 60% for Level 2 and 80% for Level 3, while some
    where aspiring to 100% code coverage. No problem! You’d
    think that a reasonably complex procedure with branches and
    loops would have provided a challenge, but it’s just a matter of
    divide et impera. Large functions for which 80% coverage was
    impossible were broken down into many small functions for
    which 80% coverage was trivial." [https://rbcs-us.com/documents/Why-Mo...-is-Waste.pdf]
    Reply With Quote  
     

  11. #9  
    Why do RSPS bases not have automated tests



    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    30
    Posts
    16,307
    Thanks given
    7,215
    Thanks received
    12,308
    Rep Power
    5000
    Quote Originally Posted by Greg View Post
    The number of dupes that would've been avoided if people only unit tested their container systems is probably laughably high.
    Anything that can result in permanent data loss of things that have a monetary value (e.g. items as you point out, but also microtransactions) should be heavily tested. There's no excuse to turn around to your players and justify why they lost something they worked hard for or spent their own money on, it's just negligence on part of the server owner at that point.

    As you also point out, things like dupes can cause irreparable damage to a server's economy if they don't have the option to roll-back updates/save files. Imagine if your server launches to great success and a week later everything is ruined because the economy went down the shitter and now nobody wants to play - what a disastrous waste of effort everything else would have been which could have been avoided with proper testing.

    Attached image
    Reply With Quote  
     

  12. Thankful user:


  13. #10  
    Registered Member
    Andys1814's Avatar
    Join Date
    Feb 2013
    Posts
    974
    Thanks given
    688
    Thanks received
    455
    Rep Power
    727
    Basically what Greg and Scu said.

    It should be pretty obvious: Software Development processes (TDD, for example) do not exist in the context of an RSPS, and when so many so-called "programmers" work on the same base in the fashion the Greg described, it is literally impossible for somebody to come along and start writing tests because of a lack of a very simple concept called "testable code." Every codebase I've seen in RSPS has horrible issues with what I've heard some people on here call global state and tightly coupled dependencies (i.e no dependency injection), which means you cannot isolate and run unit tests on individual parts of your system. (You can imagine an instance in which Item depends on item definitions, depends on cache, depends on config, etc.)

    Also, this isn't the reason why bases aren't unit tested, but manual testing is probably equally as useful in RSPS.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 8
    Last Post: 12-05-2009, 04:42 AM
  2. Why does peterbjornx not have vet.
    By Harry in forum Complaints
    Replies: 1
    Last Post: 11-19-2009, 12:37 AM
  3. Why do people say 'I'm not racist BUT'
    By Templer in forum Chat
    Replies: 3
    Last Post: 06-04-2009, 01:50 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •