Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411507 Posts in 69374 Topics- by 58429 Members - Latest Member: Alternalo

April 25, 2024, 11:49:10 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Full JS+backend integration tests
Pages: [1]
Print
Author Topic: Full JS+backend integration tests  (Read 2838 times)
thomf00
Level 0
***



View Profile WWW
« on: January 16, 2017, 08:14:09 PM »

Aloha! I've opened up a new lib that should hopefully make writing my battle arena browser game faster! And potentially others...

The front-end is currently haxe that compiles to javascript, with a backend that is haxe that compiles to neko. Normally as I develop my app I would write tests on the frontend and the backend, and for each I'd mock out what the other is doing. The problem with this is that the tests become very fragile, and they don't really test the whole application working together.

Javascript is single threaded and doesn't have access to system calls, so it makes writing full integration tests tough. The lib I made basically runs a server that your javascript tests can talk to to start up your server in some specific initial state. Then you could spin up a client or two and perform some use-cases, and then a few milliseconds later check the results.

https://github.com/thomasuster/integrate

This is an experiment, I have no idea if this will scale well. I would love wisdom from anyone who has done something like this before.

If you have feedback please let me know! Or if you're interested in this but have no idea what I'm talking about ask me questions!

 Beer!
Logged

Twitter @thomasuster
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic