Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Normally writing in Java I'd write unit tests for my code and although not always possible I try to write them prior to the code (Test First) this means I can run all me test with the click of a button
I'm struggling to see how to automate my testing for Thingworx and I'd be interested in hearing how other people have built automated unit tests?
At Devicify we are starting to work on an automated testing suite for our own software, but ThWx has nothing built in that I know of. It's definitely not a test first sort of system. I am hoping to find some REST service based testing mechanisms which will ease the pain but that doesn't help with mashups, nor likely security testing. I'm only really commenting here to follow this for future insight from ThWx.
Just like in Java as you are building your own unit tests, you can do the same using Thingworx services. There are tools available as well that you could use to help you do more automated testing either on the API execution as well as Mashup behavior.
Thank up for replying
Do you have any examples\tutorials? The Java test frameworks are very mature now and patterns exist for mocking, testing and assertions - I think that Thingworx has equivalents yet.
I'm considering using SoapUI for testing and while this should be OK for system, integration and acceptance testing I'm not sure how suited it will be for units tests - I'll update this answer when I have tried.
Existing Thingworx services as well as custom services written as Javascript services or Java extension services can be tested using Testng to call those REST API services. These would be considered integration/interoperability/functional tests. From a unit test perspective JUnit with mocking frameworks like mockito, powermock can be used.
Matt Ward wrote:
Existing Thingworx services as well as custom services written as Javascript services or Java extension services can be tested using Testng to call those REST API services. These would be considered integration/interoperability/functional tests. From a unit test perspective JUnit with mocking frameworks like mockito, powermock can be used.
Are you able to use JUnit to test Java Script created inside a Thingworx service?
Jasmine seems like a really nice test framework - you have to copy and paste your code to do it. I'm curious how Thingworx ends up calling the snippet and how the `var result` return value is acesse.
We had build our Testing Suite on TW itself using javascript code and API Keys to call own build services, not hard to develop. Here how it looks like:
Could you please let me know on which automation Testing tool you build the Testing Suite to test Thinkworx services?
Let me know some what in detail step by step where and how to build.
1. Can we have your automation Testing suite & test date at our local system?
2. Will your test suite can be used for Regression test execution for Multiple services of IoT?
3. I am Curious to build the similar framework for automating all my services, Could you please share your Test Suite Architecture?
It will be great if you could attach your Test Suite architecture document? Thanks...
Hi Sundar,
We built on top of TW with TW itself ( Javascript Server Side Services ).
1. It's not ready as a component, but could be done with some effort.
2. I don't know if it's exactly what you are searching for, but for each Test Set we have an expected result and it can check if the service returns exactly this result or not ( event if it's an Infotable --> It will check row/column value ). At the previous Screenshot you can see at the bottom right on the left the result and on the right the expected result.
3. What does you mean on sharing our Test Suite Architecture?
We are a small team and for now we don't have it documented. But some features:
Missing things:
Thanks for your information, did you already tried with
1. Perfecto Mobile, Selenium, SOAPUI and LoadRunner to automate the services for Testing?
No.
Automation testing framework can be doable for TW services
with the Testing tool Perfecto Mobile, Selenium, SOAPUI and LoadRunner ?
Let me know some one has done with the above testing tools in detail.
Its URGENT, Appreciates if any let me know soon.
1. Even can we integrate ThingWorx IoT with ALM as well?
2. Performance testing is doable for Thingworx IoT cloud services, if some one done with it let me know the tools used
is it Perfecto mobile with Loadrunner, Loadrunner, Perfomance center, SoapUI?