2

I use LightStreamer (it is a software to send broadcast messages from server to subscribed javascript-clients) to get events to update complicated data view on webpage. There are a lot of different events, with different datasets attached. And it is quite hard to test this system because I need to do much work to cause event generation.

I want to test webpage separately from back-end, so I want to create 'LightStreamer mock' that will send to client predefined events.

What is the best and simplest way to do it?

Jarrod Dixon
  • 15,727
  • 9
  • 60
  • 72
Pavel Surmenok
  • 4,584
  • 4
  • 30
  • 33
  • was the answer helpful for you? – MikroDel Apr 03 '13 at 13:15
  • In general I know that if I want to create mock for something I can use mock frameworks. I just awaited some answer that is specific for LightStreamer. Maybe someone have been doing this already and can show best approaches to mock LightStreamer. – Pavel Surmenok Apr 03 '13 at 14:23
  • Pavel - the approach in general is the same. You asked the question with the only tag "mocking" and without any tools (Moq, etc) which you want use for it. – MikroDel Apr 03 '13 at 16:03

1 Answers1

0

Pavel - your LightStreamer should have some Interface - that is the way you can mock it.

If it is the case - there is an interface - you can use some of mocking frameworks to make it easier for you.

MikroDel
  • 6,705
  • 7
  • 39
  • 74
  • 1
    I confirm that Lightstreamer ( http://www.lightstreamer.com ) has APIs (so interfaces) for both the server side (Adapter development in Java and .NET) and the client side (Client development in JavaScript, Java, .NET, Android, iOS, Flex, Silverlight, and several other platforms). – Alessandro Alinone Apr 03 '13 at 13:13