We have a test suite automated in Selenium with Java using Maven.
Now we have TFS 2015 and we were able to use the Maven task to build the selenium project in Build Definition in TFS 2015.
I have seen several links which describe executing Selenium scripts in C# from TFS Release Definition on a remote machine, but I could not find any information on how the Selenium scripts developed in java can be triggered from TFS Release Definition.
We don't want to re-do the whole automation in C#.
So please can you help me to know how Selenium java scripts can be triggered from TFS 2015 and results can be copied back to the release definition?
This should similar as this thread: Selenium Java Integration with Team Foundation Server
First, let's divide and conquer. You want TFS integration with Java,
TFS doesn't care if you use Selenium or another framework. Second, you
want to read TestNG results into TFS. As it's possible, I'm not sure
it's a good solution and maybe you should moving to C# and .NET in
your testing.
So to answer your questions:
You can either read xUnit results to TFS, or implement your own IReporter and read it with TFS API.
Running your scripts is simply running Java with TFS.
Yes TFS is natively for C#, but there are extensions for Java, so integration is possible, though it's not as smooth as working with
something native for your programming language.
TFS and Java can be integrated as explained above.
Related
I have my selenium code in Java with TestNg framework (used Eclipse as code editor), but now I need to integrate it in TFS. I am very new to TFS but I have seen many ppl told it is possible so if somebody can help me with exact steps from starting it would be really helpful. If some hidden tips and tricks also , any body can suggest for smooth integration please do so. Thanks in advance for your time!!
The first thing is setting up your environment, both local and build server. You'd better to make they are some as each other, which could significantly reduce build issue/error.
For your local develop environment, please use Visual Studio Team Explorer Everywhere for Eclipse (VSTS and TFS) which is a plug-in for Eclipse that enables you to work with Team Foundation Server (TFS) and Visual Studio Team Services (VSTS) using both Team Foundation Version Control (TFVC) and Git version control systems.
Since you are new to TFS, suggest you first go through the build and deploy pipeline of JAVA projects with TFS. -- Working with Visual Studio Team Services (VSTS) and Java
About Selenium and test, please take a look at below tutorials:
Testing Java applications with VSTS
Selenium Java Integration with Team Foundation Server
Get started with Selenium testing in a CD pipeline
I have written selenium tests in eclipse java. I have manual test cases in tfs. Is there a way to update automation test status in tfs thru java code
About the TFS and java integration, take a look at below question:
Microsoft provide a full, rich TFS Plug-in for Eclipse (called
Team Explorer Everywhere). This provides full source control, work item tracking, build, sharepoint, reports access etc into TFS from
Eclipse based IDE's. It's written in 100% Java and talks directly to
the web services exposed by TFS.
Source Link:
TFS for Java - bad idea?
More details about how to get the best out of TFS if you are a Java developer, checkout: Working with Visual Studio Team Services (VSTS)/TFS and Java
If you want to link Java Test Automation with Microsoft Test Manager, TFS , Test Cases, which is not support for now, track this uservoice: Enable Java Automated Test to execute from MTM and get the java test automation linked to manual test cases
If you want to update automation test results/report in tfs, possibility duplicate of this question: Selenium Java Integration with Team Foundation Server Please go through the details in the answer, which should be helpful for you.
What are some web UI automation frameworks available out there?
I know about this question, but it was asked 3 years ago and things have changed a lot since then. I just wanted to find out if the answers to that question are still relevant or there have been newer and better tools developed since.
I'm asking this again because after doing some googling I've stumbled upon tools such as Geb and Capybara that were not mentioned as an answer in that question.
there have been newer and better tools developed since.
Take a look at the TestCafe testing framework. It runs functional tests in any modern browser and any device. No WebDriver required.
TestCafe is a pure node.js solution.
It can be easily installed (npm install -g testcafe is enough).
Works without plugins for browsers and additional configuration.
Write tests in ES6 and ES7 JS syntax.
Has smart waiting system, so runs async tests fast without extra waiting.
Can be easily integrated to your CI system.
Support for running tests on remote machines, devices, and cloud.
Free and open source.
You can use WATIR with Cucumber. Infact facebook uses watir for its UI automation.
I would definitely stick with Selenium, TestNG (and Selenium Grid for industrialisation).
If you want something at a slightly lower layer, you can also look at HtmlUnit.
IBM Rational Functional Tester (IE and older firefox builds) or QA Wizard.
RFT runs on Java/Eclipse.
https://stackoverflow.com/a/13024991/423955
Sahi (http://sahi.co.in/) should be the best alternative for selenium. One can use java or javascript for the sahi scripts, php and ruby driver is also available (no personal experience with Ruby or php). Very effective with cross browser as well as cross-platform.
Some of the lovable features are: No explicit wait required. For element identification _near, _under, _in etc ApI's are very useful. Logging/Report, feature is inbuilt with Sahi. No Complex configuration required to run the Sahi scripts
Is it possible to run Selenium tests written in Java in the Play1 framework?
The Play! framework supports Selenium tests in their tests runner but the documentation states that the tests have to come as "HTML tables".
Selenium on the other side supports Java APIs which is much more convenient and offers all the capabilities of the normal programming language.
However I did not find anything in the Play! documentation about running Selenium tests written in Java.
Without having used Play myself, it does seem to have standard Java dependency integration for pulling libraries from a Maven repository. From what it says in the documentation, you could edit the dependencies.yml file, and add something like:
# Application dependencies
require:
- play 1.2
- org.seleniumhq.selenium -> selenium-java 2.24.1
which would allow you to use Selenium's standard Java API.
My team is developing a Java application which is to be deployed on Google App Engine(GAE). Currently we use the eclipse-plugin to build and deploy the code in GAE.
However, I would like to automate(by using cron or svn-post-commit hook) this process so that the source code in subversion trunk is automatically deployed in GAE before each scrum meeting. I hope this would eventually reduce the load on our programmers and help them to focus more on the application logic.
Please let me know if this is possible with Java+GAE+Subversion
thanks in advance
It is possible. This is what I did with my project. I should also note that this question is similar with another stackoverflow question in Possible to integrate Google AppEngine and Google Code for continuous integration? and it provides several good answer that you could use.
That being said, my personal approach is to set up ant build for the eclipse project, and use Jenkins to automatically update the code from Subversion and build them up using the ant build.
You could then add a target using appcfg and macro provided by google to upload your built project to Google App Engine. More details of using Ant on Google App Engine could be seen in here.
A bonus point of using continuous integration tools such as Jenkins is that you could add automated unit testing using JUnit or your personal testing flavor. It will save your team lots of headaches in the long run.
I used python for GAE and there is a appcfg.py script with which one can deploy the code with one command as -
python appcfg.py update
This makes me think that for Java as well there must be some script from Google to deploy applications. If there is one, then what you are trying to do must be a simple command which be used a cron job.
Your team should use a Continuous Integration tool, e.g. Jenkins. This will solve your next problems too, which you may not thought over: it can be configured to run unit and integration tests before deployment. It has many options for version control system integration.