TFS- Selenium java integration - java

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.

Related

How to generate reports in selenium webdriver (java)?

I have written my automation scripts for a registration scenario using selenium webdriver and java in Eclipse IDE creating maven project.
I have written my entire script (End to end application flow) under java main .Now business people are planning to integrate with Jenkins.Can you please help me how to generate reports to see my output results in eclipse and jenkins?
Note :I have not used any cucumber annotations,features files,step definitions,test runner classes.I right click my project in Eclipse IDE and run as java application and see the results in console.
There are several known and widely used tools for creating test reports.
I prefer using extent report report.
It can be easily integrated with major testing frameworks like JUnit, NUnit, TestNG, etc.
You can simply find a lot of perfect tutorials how to use it. Like this and many others.
Since Selenium does not have itself a reporting functionality we have to import Reporting libraries such as extent reports. It can be easily integrated with major testing frameworks like JUnit, NUnit, TestNG, have .html reports and the level of customisation it offers is commendable. You can read this article. here
Also you can use TestNG reports here
But its more advantageable if you use extent reports

Execute Selenium java scripts from Release Definition in TFS 2015

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.

Selenium Java + TestNG integration with TFS

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

Automatic deployment in GAE from subversion trunk

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.

Are there any tools for automatically generating Java code for screen scraping

Is there a way of browsing a web site through a proxy and autogenerating Java code (using HtmlClient) that can play back the requests?
Take a look at Selenium. You can use the Selenium IDE to record a session, and then choose use the "Export" menu item to export it to Java tests. You can then use the Java Client Driver to run the tests.
Not sure what your code generation needs are. Have you looked at Apache JMeter that records test cases through a proxy and also provides interfaces for you to generate your own data.

Categories

Resources