문제

I am trying to digest how robot framework would help me to automate system test. I have following requirement I have multiple agents that pushing data to central server and UI connects to server to show that data.I have multiple paths to test agent to server and server to UI. Along with this I need to validate end to end test from agent to UI (validate Data sent by the agent in the UI). I am trying to understand how robot framework can help me.

I have the following requirement:-

  1. I need to run test cases for testing multiple paths on different systems
  2. Tests could be in java(Junit) python or Jasmine tests
  3. I should be able to collect all logs or reports to central system

It just talks about writing the keyword driven test cases but how do I write the actual test cases? Is this just a driver for all test cases? How does it help for remote execution?

도움이 되었습니까?

해결책

With robotframework, you don't write tests in another programming language, your tests are in the robot language. You don't use junit or jasmine with robot. So, that seems to violate requirement (2) in your question. However, you can write keywords in java or python, and have your tests execute those keywords.

I don't fully understand what you're trying to do, but there's a good chance you can do it with robotframework. For example, you can probably write a keyword like "tell agent to push data to the server", you can write another keyword like "Verify server has value", and you can write a third keyword like "Verify value appears in the UI". You can write those in java or python, or combine existing keywords (eg: maybe "Verify value appears in the UI" is build by combining several existing selenium keywords).

You can then write a test case that calls each of those keywords in succession.

Your test case might look something like:

| Example test case
| | Tell agent to push | Hello, world
| | Verify server has the value | Hello, world
| | Verify the UI shows the value | Hello, world

Depending on how your agents and UI works, those keywords might exec some command line tool, or they could access a RESTful web api, or they might use selenium to validate the UI. Robot keywords are very flexible, and can do anything that you can do in your chosen language.

다른 팁

If I'm understanding your question correctly, the answer is that Robot Framework is effectively a shell for Python, so you could use it as a test-based driver for anything you would like to write in Java or Python, and from there the sky's the limit.

This isn't really how Robot Framework's designed, but here's an outline of how I think it could be used like you're thinking.

Robot Framework runs ->
                        a Robot Framework keyword which runs ->
                                                                some Python/Java code which executes

In other words, yes, Robot Framework CAN function as a driver for at least Python and Java scripts, which themselves can (probably with some arcane import) execute Jasmine in turn. If the script that Robot Framework is running fails, then Robot Framework will report a Fail. If the script that Robot Framework is running executes correctly, then Robot Framework will report a Pass.

I should add that I've never heard of Robot Framework running both Java AND Python files at once.

Theoretically, Robot Framework can also run .cmd and .bat files. From there, the sky's the limit.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top