I am using iPhone Simulator in MAC with Xcode to run my tests which I wrote, even if I code first time and if I want to test the code works or not I need to run in simulator is there is any alternative way to do it ? instead of running in simulator even to test a code before the actual Test runs ?
I use Google Chrome with User Agent as iPhone to identify components as my application renders based on the Browser agent.
My initial plan is to call Chrome with pre-defined Profiles and user agent extensions.
Kindly give your suggestions.
There are many emulators out there for the iPhone. Configuring Chrome with User Agents is one of the quickest and easiest.
Maybe implementing your tests with a slicker tool may help reduce this burden? I suggest you take a look at iOS Driver.
Related
I want to write a browser automation script which can be used by others to perform their mundane tasks easily. For example, a script that will login to a site using provided credentials, select few products ( passed as parameter) and put them into the cart and checkout automatically.
I would like to keep the end-user installation easy and light. Don't want the end user (who is not tech-savy) to download and setup anything.
I had tried Selenium webdriver in Java for this. The script part works perfect for the requirement but asking the end user to install and set up JAVA, etc is not possible.
Would like to know if there is any simple way to achieve this. Preferably an open source solution, but not necessary. Goal is ease of setup and use for the end user.
Can anything similar be done for Android also?
I am automating a scenario(selenium) where i need to enter credentials in Authentication Pop up, which is generated by the APP. I am using java Robot class to perform this function, it runs fine when i run it from my local machine which is a Windows Platform, but it doesn't seem to work when i trigger the build from jenkins. It hangs at a point where you need to enter the Credentials in Authentication Pop up. I think This is because the jenkins slave is an Unix Platform and this has something to do with the cross platform issue. As i am not sure if Unix Supports the Robot class.
Can somebody suggest me a workaround for this problem ?
Thanks in advance!!
The problem might be that you are testing on a headless server? Make sure your are not using firefox or chrome driver. Try to use the HtmlUnitWebDriver driver instead.
We have developed selenium webdriver script with junit+java using eclipse on window 7. All the scripts are working as expected now we are using this script for load testing using Jmeter. However, while running script system open multiple browser (200) based on user thread and it create system to hang, is there any way to handle this or we can run script without opening browser. I have come across xvfb tool, but not able to get java api for this tool to plugin in eclipse.
We have also tried using HtmlUnitDriver but as it does not support javascript hence the test is getting failed, also we tried HtmlUnit and found same thing.
Note: that we have writen webdriver script to maintain display item of element (autocomplete, image) on screen.
It would be great if anyone can help or provide more inputs on this...
Firstly, do not integrate selenium scripts with JMeter for load testing! It's not a good approach to follow due to the obvious consequences that you have mentioned in your post. I followed a similar apporach in the beginning when I was new to JMeter and selenium but suffered a great deal when it came to running load tests that spawned too many browser instances which killed the OS.
You can go for HtmlUnitDriver or any headless browser testing tools out there with JMeter, but still, they will be running the browser internally in the memory. Moreover if your application is heavily using Javascript, it won't help.
So I would suggest that you record a browsing session with JMeter Proxy and modify the script (set of requests) according to your needs and play those requests alone, with number of threads.
From a higher level, you should be doing this:
Add a JMeter test plan, listeners, thread group and setup JMeter proxy and record a browsing session where you enter something into the autocomplete textbox and you get certain results.
Stop your proxy and take a look at all the requests that come under your thread group.
As far as I know, when it comes to autocomplete plugins, multiple
requests are sent everytime you enter a letter into the textbox. For
example, for the word 'stackoverflow':
Request1: q=s Request2: q=st Request3: q=sta and so on
Here you can simulate this effect by including words such that all
words have the same length which in turn will let you have same
number of requests to be sent to the server.
So in your test plan, you will pass one word per Jmeter thread. You
can pass the words to a request, from a csv file by using jmeter
parametrization.
This will be a much memory efficient way of load testing instead of using selenium with JMeter. I had asked a similar question. You can check out the responses.
I need to display any web page as a browser field,not browser session.I am building the app in 4.7 OS.Can anyone help me with sample code?
On 4.7 you are stuck with the old browser field. Also known as Browser Field 1. It renders HTML pretty close to how it was on 4.5 devices. There is no way to take advantage of the newer browser that you invoke via browser session. So, you can forget about CSS2 or or JavaScript on the pages you want to render as a browser field. But for the fairly basic stuff it is good enough.
For the sample code - you really should check out and understand all the examples there are in the development package before starting writing the code. It will really save more time than take for learning. Look at components\samples\com\rim\samples\device\blackberry\browser\BrowserFieldDemo.java
I doubt that the problem lies with the browser field per se. Rather with communications.
The people in the post that you refer to were probably suggesting ";deviceside=true" as this gets around the "BES effect" in a simulator.
You may wish to experiment with running the MDS emulator alongside the simulator session as well. There are a number of posts that discuss the impact of deviceside and simulation. You can test in code to see if you are running a simulator so that you can programmatically influence the "BES effect".
We need a tool to test a set of fairly complex Java applications. The applications are mostly independent client programs or applets communicating with a servlet or apache server at a remote site. Specs:
Runnable on Windows XP, Vista and 7
Parameterizable (Can specify in a script the sequence of buttons to click, text to type in JTextFields and browser address bar etc.)
Can quit or bail out or display a nasty message if the expected window or dialog box doesn't appear
Record the output on the Java Console of browser in a .txt file (IE is sufficient for now) when the application opens a browser window.
While running, I should be able to see it running with folded hands while it would run
for a few minutes
We were thinking of writing an AWTRobot based tool that reads a command file and does this - (don't know how to do #3 or #4 yet - will ask you folks some day how to detect a window on the desktop). Would you suggest an open source tool available to do this? We don't need anything fancy to capture video or screenshots. Thank you, - M.S.
For browser based automated testing you can use Selenuim or you can use WebDriver.
The selenium project is hosted here
If you don't need to test the way the pages are actually rendered by the browser, but instead need to work at the HTTP/HTTPS/etc request level then have a look at JMeter. It has parametrization, dataproviders, graphs, and a proxy component for recording http user sessions.
If you do need browser testing, then, as has already been mentioned, Selenium is probably the best freely available tool. For production I would recommend using Selenium Remote Control server which can be driven by scripts written in Java/Python/C#/Perl/PHP.
To see what tools people use in real production environments, and to do your own research on what is available I recommend www.sqaforums.com.
Have a look at Sikuli
The reason I suggest this is it sounds like you need to test both a Java applet and the content of a native browser (launched from Java, but not itself Java) -- so it's not "Java all the way".
I'm not sure what you mean by criteria 4, though. It is worth noting that as Sukuli works by image analysis, it won't be able to copy text to a text file.
This question is an invitation for sales pitch, don't you think. How about Mercury Quicktest professional ( I believe its HP Quick test now). I do not believe this will be cheap either ( and well its HP, it will probably only work in IE ;)).
Since you want an open source solution, I believe, the most popular option is selenium and yes its a pain to configure sometimes ( like for Flex for example). So you should try Watir.
There is a lot of good buzz around it and when I evaluated it, I loved what I see.Also it does not work for desktop applications, I suggest you try some other solution for that.
(The problem is open source GUI testing tools are not usually all inclusive. If you need one solution to handle all your gui testing needs, then you should check out the more commercial ones like QTP.
I have used IBM Rational Functional Tester. It has everything you need and it's quite easy to learn. The scripting language is either Java or VB.Net so you won't have to worry about learning a language for your tests.
I had some pretty good results with Squish from FrogLogic and didn't break the bank: http://www.froglogic.com/products/
Did you try Squsih - http://www.froglogic.com/products/index.php