TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Robot Framework: generic open source automation framework

163 pointsby wiradikusumaover 2 years ago

28 comments

lvncelotover 2 years ago
I am less than lukewarm on those sort of &quot;Natural-Language-Like&quot; DSLs that seem to mostly come out of the QA space.<p>When I worked together with a QA team for automated testing, they used Cucumber, which uses Gherkin as an english-but-not-really DSL. Now the idea is obviously, that someone who doesn&#x27;t know how to code can still describe and read test scenarios. But what ended up happening eventually is that I spent a lot of time writing code to support different Gherkin expressions, but then had to take over writing the Gherkin expressions as well, because even though Gherkin -looks- like english, it still behaves like a programming language. In the end, it would&#x27;ve been much easier for me to just write the tests in a programming language from the start, instead of using an abstraction layer that turned out to serve no purpose.<p>What I took away from that frustrating experience is that a lot of people think that learning to code is learning a syntax of a programming language, and if you could just do away with that pesky syntax, everybody could code. But, obviously, the syntax ist just the initial barrier, and actually coding is crystallizing and formulating intent - something which programming languages are much better at than natural languages.<p>But for some reason, this low&#x2F;no-code idea never seems to die down, especially in some spaces, and I have the feeling I&#x27;m just missing something here.
评论 #33341762 未加载
评论 #33342871 未加载
评论 #33341779 未加载
评论 #33345770 未加载
评论 #33347284 未加载
评论 #33341892 未加载
评论 #33346826 未加载
评论 #33344609 未加载
评论 #33343838 未加载
评论 #33345936 未加载
评论 #33343995 未加载
mkl95over 2 years ago
A QA consultancy used this tool at my previous gig. They were extremely unproductive, as in several months to deliver a few tests.<p>Honestly if you know your Python you are better off with Selenium, which is probably what Robot uses under the hood anyway.
评论 #33341226 未加载
评论 #33341283 未加载
评论 #33341276 未加载
评论 #33341232 未加载
dengover 2 years ago
Used it extensively for a while. I think all in all, it&#x27;s a nice, mature framework. The Gherkin stuff is completely optional, I&#x27;m not fond of it and never used it. Using Python, you can create a custom DSL tailored to your needs, so that you can write tests in a tabular form. All your tests will need to adhere to this rigid tabular structure. Whether this makes sense, entirely depends on the circumstances. Compared to just using pytest, I think the main advantage is that tests can also be written and extended by people who are not familiar with Python. So if you have a separate QA team with people who are not programmers, this might make sense. Also, I did like that this rigid tabular structure made all tests very much alike, whereas when using pytest, you often end up with a hodge-podge of different ways to test things and people re-inventing the wheel all the time.
ithinksoover 2 years ago
Now that&#x27;s a name I haven&#x27;t heard in a long time...<p>Burn. It. With. Fire.<p>I was at Nokia and we used robot, what an absolute pain it was
评论 #33341365 未加载
评论 #33341135 未加载
评论 #33341245 未加载
评论 #33342114 未加载
评论 #33341121 未加载
评论 #33341201 未加载
alex_suzukiover 2 years ago
I remember this from a gig I did a while ago. Customer wanted to establish their own automated QA and thought Robot Framework was a good fit, because the language „looks easy“. The goal was to enable IT personnel that lacked a technical background, with no programming experience, to write tests. I was sceptical from the start, and was eventually proven right (I did not enjoy this, it created more not-so-enjoyable work for me). Test code was flaky to the point of being useless, and contained alot of redundancy. IMHO it is really hard to write good tests without having a bit of a „programmers mindset“.
评论 #33342855 未加载
评论 #33347218 未加载
xylixover 2 years ago
I develop tooling around Robot Framework as my main job, personally I feel biggest tradeoff of RF in Python world is that it competes against Pytest, which is my personal favourite testing framework out of any I have tried.<p>In JavaScript projects I don&#x27;t have such a favourite, Jest and Mocha have been okayish when I have tried them but didn&#x27;t really spark joy. In multilanguage projects (like the Playwright based robotframework-browser which I have been developing) I have enjoyed writing integration tests with Robot Framework.<p>I don&#x27;t have excessive experience with other comparable QA tools (like cucumber), but I would say Robot Framework&#x27;s main advantage and disadvantage are both the fact that it is constantly so close to python. (E.g. you can easily do in-line python expressions, but if you were to have a team working with Robot Framework where some are lacking Python competence those might become very confusing pretty fast.) Also for writing advanced libraries Python usage is pretty much mandatory. But I guess it&#x27;s pretty rare for a DSL to support writing advanced extensions with the same DSL.
mydevlprplanetover 2 years ago
I have used RF for many years now at different companies. We use it for automated integration tests, it does not matter in which language your application is written. I do admit that it requires some programming skills, especially for the keywords. Choose the keywords wisely and ensure that the QA people know how to use them. We also use it as part of regression testing and even for acceptance tests with the customer.
hpaavolaover 2 years ago
From QA perspective Robot Framework is by far the best tool there is.<p>First of all, it&#x27;s not web testing tool, it&#x27;s not mobile testing tool, it&#x27;s not REST API testing tool. Or any other specific testing tool. You can automate pretty much any testing activity using RF, including web, mobile and REST, but not in any way limited to those.<p>The killer feature from quality assurance point of view is test tagging combined with really powerful way of selecting what to include in test run and getting good reports which are supported by many many tools. Another killer feature is dead simple test instrumentation.<p>Regarding tagging. Let&#x27;s take this example:<p><pre><code> *** Settings *** Force Tags feature-xyz Suite Setup Initialize Tests *** Variables *** ${test_environment} dev *** Test Cases *** Foobar [Tags] jira-id-001 jira-test-id-001 smoke No Operation Lorem [Tags] jira-id-002 No Operation Ipsum [Tags] jira-id-003 bug-in-jira-001 No Operation *** Keywords *** Initialize Tests Connect To Environment ${test_environment} </code></pre> I can select any combination of those test to be included in given test run, specify which environment to connect and send results automatically to Jira. This allows me to run only &quot;smoke&quot; tests against &quot;Pull Request&quot; environment when ever PR is opened. This also allows me to automatically run all tests every hour against &quot;Dev&quot; environment and submit results to Jira.<p>Like this:<p><pre><code> robot --include smoke --variable test_environment:pr </code></pre> That would only run the one test tagged smoke and Connect To Environment would get the value &quot;pr&quot;.<p><pre><code> robot -i feature-xyz . </code></pre> Would run all tests with tag feature-xyz (and in the example file that would be all tests) against dev environment. And then I could just `curl` the XML result file from the run to Jira (given it has XRAY installed) and Jira would automatically update all the Jira tickets in mentioned in the tags with the test results. If there is no Jira Test tagged in RF test, Jira would automatically create new Jira Test for me.<p>And in order to display test statistics in Jenkins, just install RF plugin in Jenkins and instruct your job to read the output XML and you get nice statistics, reporting etc.<p>That way, when you need to know what is you test coverage, just open Jira and see it yourself.
评论 #33342170 未加载
评论 #33341434 未加载
kh_hkover 2 years ago
<p><pre><code> *** Test Cases *** Write my test using a DSL Read examples of the DSL Write a basic test and see that it works Write a complex test and find something missing Learn quirks about DSL Implement missing things on the language that the DSL was implemented on Write part of the test in said language Write part of the test in DSL matching regexes Run the test And it works 9 out of 10 times Install flaky extension Add flaky tag to test And it is green [Teardown] Reflect about my life as a software developer</code></pre>
elevationover 2 years ago
I test embedded devices with RF. You write most of your test drivers in python, RF simply orchestrates the tests and collects the results into a report, which works well in simple QA scenarios.<p>Robot lacks features you&#x27;d need to support larger-scale embedded test, such as with a device farm, where you need the concept of tests leasing resources. If you build a test stand with 10 testable devices and need to run a suite of 100 tests, it&#x27;s ideal to run the tests in parallel as devices become available. Some test setups might require more than one instance of a testable device, or instances of more than one type of device (for example, to ensure that a V2 product can still interoperate with a V3 product.) Robot doesn&#x27;t really support this.<p>While a feature to support this could be made extremely general (resource classes, instances, and leases) the RF developers have been uninterested in incorporating this aspect of test into their framework. The result is everyone who does even mid scale embedded device testing has to writes their own.<p>Another complaint about robot framework is that when you have an expensive setup like a 4 minute flashing operation, you don&#x27;t want to repeat it more than necessary. So in a file, you might make the expensive setup a suite-level setup, followed by the tests cases that depend upon it. When this file grows, you might want to refactor it into a multi-file test suite in it&#x27;s own sub-directory. However, these tests no longer share a suite scope (because robot&#x27;s &quot;suite scope&quot; is actually a file scope&quot; for legacy reasons) so in practice you may need to tolerate 3000 line files to avoid long setups.
评论 #33347685 未加载
评论 #33343878 未加载
dcanelhasover 2 years ago
For other roboticists who might stumble upon this: Robot Framework seems to be an automated testing framework (for testing software)
davempover 2 years ago
When I started writing tests for my current project, I looked at what was available and decided forgo existing testing frameworks. I haven&#x27;t been disappointed.<p>Writing code to call a bunch of test functions then generate a report is really not hard and having control over the whole thing is nice.
manykarimover 2 years ago
Robot Framework is a general purpose automation framework.<p>You can use it to automate - Web Applications (with Selenium or Playwright) - Rest APIs - Desktop Applications (Java Swing, WPF, SAP, ..) - All kinds of hardware<p>It offers control-structures like most programming languages (IF&#x2F;ELSE&#x2F;FOR&#x2F;WHILE&#x2F;TRY&#x2F;EXCEPT)<p>The Extensions for VS Code or PyCharm&#x2F;IntelliJ offer Code-Completion, step-wise Debugging, Linting.<p>It is very hackable and can be extended using Python. It has a great API, allowing you to connect it to all kind of other tools.<p>I guess a lot has happened since some of the people here used it.<p>But I guess, if somebody is focused on using a single programming Language (like JavaScript) and is not open to learn Python or the RF Syntax I recommend to look into another native test framework
dbcurtisover 2 years ago
Stop calling things that are not robots, robots.<p>Does this framework stream sensor data? No. Does this framework control actuators? No. Does this framework represent an actuated device’s configuration space? No. Does this framework perform collision detection? No. Does this framework keep an obstacle map? No. Does this framework have any planners? No.<p>Just stop already. Stop calling things a robot when they are not.
评论 #33343974 未加载
评论 #33345622 未加载
chungusover 2 years ago
Fun to see this is still around! Used this in 2016, at a big bank. I did not enjoy it, but that can largely be attributed to the way management wanted us to use it. The tests had to be written in our native language (not English) which caused a lot of weird mixed language use behind the scenes. Then a manager would sign off on the test report, which we would deliver to him on paper.
评论 #33341512 未加载
hkfilhoover 2 years ago
I&#x27;ve been using RF for almost 8 years now. I came in touch with it, in the beginning with my C&#x2F;C++ developer mind: &quot;...what an overhead of work...&quot;.<p>But soon a realize I was wrong and start to notice the power of writing tests in robot. And how it allowed to easy the understand of what operation I did on code in the past... like 6 months before, 1 year before... and also the ability to understand more clearly how other teams&#x27; features worked and to fix their test and features many times, because we more clearly wrote test using Gherkins in RF... and see how new team members could ramp MUCH more easily inside our environments, by reading tests, most of time.<p>I was even able to implant RF inside some other business after that, bringing together that culture of writing clear tests with RF. Some of those places had the heavy culture of writing top-down requirements precisely. On those places, we integrate RF documentation and test case procedure on our process, generating final documentation using RF test case information.<p>Since them I&#x27;m helping to disseminate and evangelizing for the RF use. I saw system analysts embracing the RF, writing the first version of test cases for requirement in matter of minutes. RF provided us with much faster peace in maintaining some very complex environments.<p>We could grab requirements, and write down cases, that latter could be implemented, edited, removed or adjusted. Whatever is the test environment, testing it is a &#x27;living&#x27; environment, and need catering from developers. RF had helped greatly maintaining such places, to produce great reports, to create this live ecosystem easy for uses.<p>Is perfect? Surely No.<p>But is much better that all other tools available around. Is open source, easy to expand, allow use of natural language. And when well used, allow us to greatly improve our QA and DEV lives :D
Agoreddahover 2 years ago
I loved this tool :) ! Few years ago, as a junior I joined one global corporation to my first job and I started to use it with zero knowledge about the python or even testing at all. But learning curve was very easy &amp; fast and as of time, we created more than 3000 E2E &amp; integration tests for our business application, running through the Jenkins. The tests were written in a very human-readable format, so anybody at the team could easily understand the test and identify the issues. Reporting had nice (but quite slow) html &amp; jquery page. Also, Robot editor was a recommended tool to write tests.<p>After a time, when I was starting a startup with a few junior developers which lacked the expertise, we used this tool in combination with Selenium to crawl data. It was fast &amp; easy.<p>Always glad to see this tool is still alive. Good job Pekka Klarck!
dangover 2 years ago
Related:<p><i>Robot Framework – test automation in Python</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10631074" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10631074</a> - Nov 2015 (5 comments)
Cupprumover 2 years ago
I wrote my bachelor thesis about Robot Framework. The biggest issue i had with Robot Framework was the lack of support in IDEs. Initially you were suppose to work on Robot Framework in RIDE (dedicated IDE build on top of Eclipse) or use a Eclipse extension. I believe both of these are not supported anymore. I like Vim, so i wrote a package, which helps users when developing with Robot Framework. I also created some pull requests for Vim ALE to also support rflint.<p>We also used Robot Framework at work for automated testing, worked like charm.
评论 #33341467 未加载
评论 #33341412 未加载
评论 #33341470 未加载
screwgothover 2 years ago
Robot has it&#x27;s peak maybe a couple of years ago. Although my company still uses it extensively there are other Automation frameworks that are proving to be better, like , say Cucumber, Cypress, etc.<p>But why is Robot Framework being mentioned and getting attention now? It&#x27;s not like it&#x27;s something new and doing anything different from the existing frameworks.
评论 #33341751 未加载
dusanhover 2 years ago
We use Robot at my current job and it works flawlessly. It can test the web front-end (Browser, wrapper for Playwright), the REST APIs (REST, RestInstance), CLI stuff and much more.<p>We selected it specifically for its versatility and the DSL is easy enough so even less technically adept testers can pick it up quickly.
Cupprumover 2 years ago
The developer experience is fairly nice when it comes to Robot Framework. Nice thing is, that Robot Framework was originally designed as automation tool, so also people who do not know a lot about coding can get up to speed fairly easily.
Cupprumover 2 years ago
If you use Robot Framework and have a lot of tests, which can be executed in parallel. Take a look at pabot [1]. It is a parallel executor for Robot Framework.<p>[1] = <a href="https:&#x2F;&#x2F;pabot.org" rel="nofollow">https:&#x2F;&#x2F;pabot.org</a>
jtnagover 2 years ago
Blast from the past, I was involved in development of IDE for RF while in Nokia.
dhannaover 2 years ago
My only experience with Robot was at Juniper Networks, where it was a poorly maintained bastard QA org tech. Would have been infinitely better if DEV’s and QA had a shared repo of python scripts.
miohtamaover 2 years ago
As an interesting note that it is not surprise that half of showcased business logos are from Finland.<p>Robot Framework is (was?) heavily used by Nokia and then spread from there to its subcontractor network.
评论 #33341763 未加载
评论 #33341731 未加载
999900000999over 2 years ago
No.<p>Write some code, or get playwright to generate it for you. Don&#x27;t use DSLs if you value your sanity.
otikikover 2 years ago
Why is it &quot;generic&quot; and what does that mean? I could not find it in the docs