0
votes

I am working on a project in which we keep one wiki platform in sync with the content of other. The way we do this is a document edit on 'Wiki A' kicks of a data flow pipeline that transforms data from format of of 'Wiki A' to format of 'Wiki B' and sends this data to 'Wiki B' for import.

I have 3 components.

  • 'Wiki A' which is in PHP
  • Translation Service which is a Ruby-on-rails service
  • 'Wiki B' which is in Java

I want to build an automated end-to-end testing framework which should ideally be able to test the following: The main need for the testing is my unit tests for each product cannot test the communication between the products and do not test the whole end-to-end data flow.

  1. Edit a page on 'Wiki A'
  2. Test that it kicks of the data flow
  3. Test that the TranslationService transformed the data
  4. Test that 'Wiki B' imports the transformed data

Based on initial research, my options are a recording tools such as Selenium. Selenium can handle the multiple products I want to test, but from what I have seen the tests are fragile. The other option is some development testing tool like Cucumber/Capybara with which I can write robust tests, but I am not sure how it works in a multiple product architecture, each written in a different language.

Am I looking at it in the correct way? Am I too ambitious to attempt a singular end-to-end testing framework spanning multiple products?

1
You will need to be much more specific. However, Selenium tests are not fragile, per se, but they are often badly implemented by testers who are either inexperienced or having to work around hard-to-test sites across many browsers. Cucumber is merely an abstraction: its rules still have to be implemented by a dev/tester and this can still be done well or badly. Also modern Selenium is not a recording tool - that's no longer supported.Andrew Regan
What specifics do I need to mention?Neel Vasa
Well, the more specific and focused your question, the more you'll get authoritative rather than opinionated and/or very high-level answers.Andrew Regan
If you are testing business flow, you may see if you can edit the wiki by rest service. How can you know the data flow starts? How do you konw when it stops? Where does the go after the translation service is done? Do you have special tests targeted at how the translation service features, or do you need a full set of tests in the integrated system? If you can use rest for Wiki A to create/change data, maybe you could verify new data within Wiki B.Dave McNulla

1 Answers

1
votes

It is possible to write end-to-end tests spanning multiple products written in different languages as long as the products provide some kind of proper interface. Ideally this is some messaging interface (e.g. Http REST). I would suggest to use the Wiki interface directly instead of accessing the UI over the browser.

I assume that 'Wiki A' provides such an interface for adding and changing content. Your integration test first of all uses this interface in order to change some data and trigger the whole process. Then you need to make sure that the content change has been processed. You can do that by verifying the change in 'Wiki B'. Also ideally 'Wiki B' offers some kind of interface to get some content, too. So your test should just use the messaging interfaces of 'Wiki A' and 'Wiki B'.

1) Trigger 'Wiki A' change
2) Verify content on 'Wiki B'

Maybe you need to wait some time between step 1 and 2 for the translation and import. You can write these kind of integration tests fully automated with test frameworks like Citrus (http://citrusframework.org)