SteamRE / SteamKit

SteamKit2 is a .NET library designed to interoperate with Valve's Steam network. It aims to provide a simple, yet extensible, interface to perform various actions on the network.
GNU Lesser General Public License v2.1
2.56k stars 488 forks source link

Improve Test Coverage #514

Open yaakov-h opened 6 years ago

yaakov-h commented 6 years ago

Areas with fairly high test coverage will be low-hanging fruit to test the last bits.

Some parts are currently completely untestable without a live connection to the Steam servers, and will require API changes (or internal-only methods) to enable testing.

Web API testing will require #450 to mock HTTP responses.

xPaw commented 1 month ago

Pretty much all the callback handlers can be tested by providing a nethooked payload of the relevant messages. (the only problem being some privacy issues like access tokens in the logon msg, etc).

I'd start by just putting all the messages into test files and running the "got packet" method over all of them and check that the expected callback was posted. More intricate tests can be written for some/important messages.