verify min version in robotframework? - robotframework

I am trying to integrate robot-framework testscripts into a project. Just after starting someone had failures which turned out to be related to him having version V4 of the framework.
Is there some way I can verify the version in the robot-script or the surrounding makefile to make a clear error message when not having V5 or more?
of course, I could parse robot --version , split off the number, and check >=5.0.1, but I was wondering if there is a nicer method of doing for this.

Related

Roboframework exit on success of a specific test

I am looking for a way to make robotframework exits the execution of a test suite if a specific test passes. It is the exact contrary of what --exitonfailuredoes so I want to know if there is a way to do this with robot framework.
Up to and including robot framework 3.1 there is no good way to skip tests once a test run has started, except to call [Fatal Error][1]. Being able to skip tests has been a feature that people have wanted for many years now.
At the time that I write this, it does not appear that this feature will be added in version 3.2.

Is there a way to monitor test log for error string using robot framework?

I am a newbie to robot framework, I just wanted to know if i can monitor my application log for a certain keyword i.e. FAIL, If i find the message i stop test and report failure.
It seems to me that the standard keyword Grep File might be appropriate. In the built in Operating System Library documentation you can find more details. In this SO Answer an example is given.

How to handle merging of branches that are not in a sequence in combination with Flyway

I just encountered the following situtation:
The test-server is currently running Flyway, with version 1 (V1). The test-server is automatically updated (including Flyway scripts) whenever anything is pushed on the develop branch.
A developer decides to start working on a new feature on branch feature/123. This developer creates a database script (Flyway compatible) called V2__cool_feature.sql. In the meantime, another developer also starts working on a feature branch called feature/456. This developer is also in need of an update script, and names it V3__another_cool_feature.sql, because the developer knows that V2 is already used on another branch. This feature/456 branch is finished and is merged, and so the current scripts on the develop branch are V1 & V3. This works well and the V3 script is executed, leaving Flyway its schema_version on version 3.
The other feature branch feature/123 is also merged, which means that the develop branch contains the scripts V1, V2 & V3.
Now this is were I'm having trouble with Flyway:
The build, including Flyway, is executed and it leaves the following message:
[INFO] Database: jdbc:mysql://example.com:3306/my_schema (MySQL 5.5)
[INFO] Successfully validated 2 migrations (execution time 00:00.019s)
[INFO] Current version of schema `my_schema`: 3
[INFO] Schema `my_schema` is up to date. No migration necessary.
What I want to happen is that the V2 script is executed, and I'm not sure how to do so.
I hope I explained my problem well, if not, please leave a comment.
Ugh, I'm not a smart guy. Putting a bit more effort into my Googling skills lands me upon the Flyway documentation, describing exactly my problem:
Option:
outOfOrder
Required:
NO
Default:
false
Description:
Allows migrations to be run "out of order".
If you already have versions 1 and 3 applied, and now a version 2 is found, it will be applied too instead of being ignored. (Even the same versioning as in my question is used >.< )

After importing failed test results build status is succeed in TeamBuild

Using VSTS (formerly know as VSO), I'm importing test results from a 3rd party testing tool.
This is working fine, however when the imported results have a failure in them, i would expect the build to fail, however it doesn't. As seen below.
Any advice? this seems like a bug.
The vNext build pass/fail base on the execution status of each steps in the build definition. It does not check the published test result. You can submit a feature request on VSTS User Voice.

How to get the result of a build in Xcode 4 triggered with Applescript?

I am running an Applescript that runs Xcode 4, but the script ends no matter what, either if the build is successful or if it fails.
Is there any way that I can wait for Xcode to finish to build and get the result? In case of a success I can just end the Applescript with a success message, but if it fails I would like to get the logs that are printed in Xcode (where I get all the errors and details) and pass them to the script so they can be saved on a file.
Can someone point me to the right procedure to do this?
Please see this question along with my answer, but essentially the build command in Xcode 4 does not work properly because of what looks to be an incomplete implementation on Apple's part. If the command actually returned a value, then Applescript would wait until it got a response before moving onto the next command.
Have you looked in the AppleScript dictionary for Xcode? Because when I look at the dictionary for Xcode 3.2, I see a command called build which takes an optional transcript argument.
build specifier : the object for the command
[static analysis boolean] : Perform static analysis along with the build.
[transcript boolean] : If given, then the full build transcript should be returned when the build finishes. Otherwise, a simple build status is returned.
[using build configuration type] : The build configuration type to use when building. If no build configuration type is given the active build configuration type is used.
I don't have an Xcode project that I can build to test this, but it would appear that you need to get the project you want to build and then call set build_results to (build the_project transcript true)
And even without the transcripts argument, you should get a build status back indicating whether the build succeeded.

Resources