Write A Few Web Tests (over WatiN/Selenium + CassiniDev Web Server) For .net Web Application?
Jan 15, 2011
I want to write a few web tests (over WatiN/Selenium + CassiniDev web server) for my asp.net web application.Problem I encountered is that I dont know what to do in such situations: there is a page where user can click the button to call some third-party service. In my web test i want to create mock of this service, which will always return static value (some value in these test case and other value in other test case).How can i do that?
Currently i use IoC/DI container Microsoft Unity. And my pages gets his dependencies in a manner described in http://msdn.microsoft.com/en-us/library/ff664622%28v=pandp.50%29.aspx.
The only solution that comes to my head is: place all dependencies in web.config for each test case and copy necessary web.config on SetUp of test.
View 1 Replies
Similar Messages:
Oct 21, 2010
In my project we use UnitTests (MsTest). We run them manually and in the build script.But for some environments where we deploy manually.We are in the need of having some smoke tests. At the moment I made this smoke tests "manually" (Login, create an user, create a licence, create a product, etc). I know I can run unit tests from command line or from visual studio but...Do you know if is possible to run these mstests (or probably a small subset) from an .aspx page and show the results?EDITED: wondering if mstests or something is able to run the tests and have something visual to show in an .aspx page similar to a list of tests passed and tests failed...I am thinking on running only a small subset of tests (5-6)
View 1 Replies
Jan 17, 2011
I have to write a application which connects to remote server(windows 2003 server, open SQL Management studio in that server and enter a specific SQL Server address and access a stored procedure, change some values and execute the stored procedure.)
I have to write this application using C#.Net , Could anybody point me in right direction, Where do I start?
View 6 Replies
Jun 4, 2010
ASP.Net MVC - How should i do integration testing on an ASP.net MVC application without necessarily running all the tests via the browser?
View 1 Replies
Dec 4, 2010
How to write a stored procedure for a crud application in asp.net?
send me which is easily understandable...
View 3 Replies
May 23, 2010
i built an web application that need to work with sql server 2005, i'm using
linq to sql for my queries, and i'm using the dataclasses.dbml object.
the problem is that i can't see the database in the server explorer, so, i can't drag and drop
the tables to the dataclasses.dbml object, i understand that the application need to be rgistered
in the sql server to be able to do so and to be able to read and write to it.
View 1 Replies
Jan 8, 2010
I want to read write excel file in my application without installing the office on my server. Means my server don't have any excel (MS office) installation. Is it necessory to install the office on server to excute the program of read or write the excel file.
View 5 Replies
May 5, 2010
Server Error in '/' Application. Attempted to read or write protected memory. This is often an indication that other memory is corrupt.Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[code]....
View 1 Replies
Dec 16, 2010
JQuery supports a syntax of $("span[id$='Label1']") to allow selection of ASP.NET INamingContainer generated ID's that have been prefixed with "ct100$...".
We are using Selenium and are looking for a similar way to select elements, ignoring the prefixes that ASP.NET generates.
View 3 Replies
Jul 15, 2010
I'm trying to make the conversion to Selenium 2, but I seem to have an issue were if I go to http://website.com, Selenium cant find the elements of my aspx form. I need to have Selenium go directly to http://website.com/form.aspx. This isnt horrible because I can make sure the forms work, but ideally I would like it to complete everything from the users point of view.
View 2 Replies
Sep 29, 2010
i am using selenium for testing website which has functionality for downloading online video.i am using asp.net as language in selenium,each time i press download button save file dialog appears which cant be handle by selenium,how can i handle save file dialog(without using autoIt exe file).is there a way to call autoit script from selenium?or any other method to handle save file dialog???
View 2 Replies
Apr 29, 2014
I want to test my site using selenium which is an automated test tool where we have to code, and in my scenario I have excel file which I want to download but on download box there is save button but i want to know how to click on Save buttonĀ ...
View 1 Replies
Mar 4, 2010
I'm using Watin in C# console app to crawl websites, there are five console app running at the same time.
The reason I partly use Watin as crawler is because a few websites use javascript(or ajax) to set page content.
Following is the sample code to get a page comment count:
Settings.Instance.MakeNewIeInstanceVisible = false;
using (var browser = new IE(commentLink, true))
{
browser.Link(Find.ByUrl(commentLink)).WaitUntilExists(20);
Span commentSpan = browser.Span("COUNT_TOTAL");
if (commentSpan.Exists)
{
int commentCount;
if (Int32.TryParse(commentSpan.InnerHtml, out commentCount))
{
return commentCount;
}
}
}
My problem is after running these 5 console app for a while (90 min), a lot of IE instances are stayed open (because of timeout or error or IE is busy), so the system is quite slow and need to reboot. How do I change my code to prevent this thing happen and make my apps stay effecient?
View 1 Replies
Mar 16, 2010
I can't seem to get a hold of it!
First attempt failed:
string url = "http://jquery_ui_dialog.aspx";
IE jQueryDialog = IE.AttachTo<IE>(Find.ByUrl(url));
Second attempt failed:
Process[] processes = Process.GetProcessesByName("iexplore");
foreach (Process p in processes)
{
if (p.MainWindowTitle == url + " - Microsoft Internet Explorer")
{
// this doesn't find it.
}
}
3rd tries the charm?
View 1 Replies
Dec 14, 2010
I'm testing a site that serves up some binary (i.e. non-HTML) content. Some links directly deliver custom images, other links custom PDF's.
I'm building test cases in WatiN and NUnit. Wondering if there's a way, using WatiN to get it load a page and then get the byte[] contents of that page.
Currently, I'm just launching a WebClient to grab the content, rather than through WatiN but that's more untested code in my test suite.
View 1 Replies
Mar 16, 2010
We're having an intermittent problem that occurs when running certain integration tests on our continuious integration server..
For some reason, every now and then, we get an autocomplete popup that causes a timeout and ultimately a build failure. Is there an eloquent way to detect the popup and click through it?
View 1 Replies
Feb 21, 2011
I have the Problem with the File Upload window. When I used it the first time it works perfect but when I call the same functionality to open and upload a File the open button (in the "Choose File to Upload" Dialog) is pressed to fast. So the Test can not write the complete path of the File over set and so the I can not open the File. The Source Code of the function:
public void OpenFileDialogAndUploadCsvFileWithName(string fileName, IE editPage)
{
var fileUploadDialog = editPage.HtmlDialog(Find.ByTitle(PageTitle));
fileUploadDialog.WaitForComplete();
FileUpload fileUpload = fileUploadDialog.FileUpload(Find.ById(new Regex("_FileUpload")));
fileUpload.Set(fileName);
Image image = fileUploadDialog.Image(Find.BySrc(new Regex("/icons/upload.png")));
Element parentElement = image.Parent;
parentElement.FireEventNoWait("onmouseup");
parentElement.FireEventNoWait("onmousedown");
}
The Upload File Dialog is open from Internet Explorer Modal Dialog Window.
View 1 Replies
Aug 20, 2010
I am writing Watin test in MVC Asp.net app. I mvc app, all input are wrpped with form and every time an input or textarea is changed their form gets submitted by jquery like code below:
$("textarea", context).change(function() {
$(this).parents('form:first').submit();
});
This is perfect when changes are done by keyboard. However this doesn't trigger the form submit when input/textarea are changed by Watin TypeText() method. I tried to call Change() and Blur() events by Watin and also tried PressTab() with no luck.
View 1 Replies
Aug 16, 2010
These questions were asked me in a technical interview:If we deploy an application on multiple server (like database server, web server) then, each request should be redirected to proper server, then how you will handle it in your code?How security pinholes will be handled in an application?What things should be considered while writing a web application?How will you do load/performance testing of web application? hich framework you will use for it?How will you implement a cache for results which require a DB access?Please let me know how to write an web application considering all these points. I am not so much aware of architechural design of web application.
View 2 Replies
Nov 23, 2010
how can I create stored procedure and write my select statement in it, I know how to create dataset then put type stored procedure and assign it to the sp ... what I want is writing my sp... how can I make it ?
check the following code, this is what I want to write put I don't know where or how !
CREATE STORED PROCEDURE SP_CATEGORY
@CATEGORY VARCHAR(30)
AS
BEGIN
SELECT LATIN_NAME, ENGLISH_NAME, ARABIC_NAME, CATEGORY
FROM FLORA, CATEGORY_LIST
WHERE FLORA.CATEGORY=CATEGORY_LIST.CATEGORY_NAME AND CATEGORY_LIST.CATEGORY_NAME IN (SELECT * FROM SPLITLIST(@CATEGORY, ','))
END
where can I write this code ?!
View 5 Replies
Oct 29, 2010
I need to write an animation that I can control via an application. Basically I need to simulate some mechanics (flow and rotation type of stuff) that is based off of a set of parameters a user would enter. Would Silverlight be a way to go for this? I really don't know too much about it.
View 9 Replies
Aug 5, 2010
How can write php script in flex application ? . at the same time this script can be asp.net,javascript ...
View 2 Replies
Jan 28, 2011
I would like to write text file under my applicaiton folder like below;
../myapp/Data/mytextfile
View 3 Replies
Nov 12, 2010
how to use OAuth. Twitter has no longer supports Basic HTTP Auth, and now requires OAuth for all Twitter Applications. You no longer need to have your app use their twitter username/password. That's the point of OAuth. This is very similar to how Facebook App authorizations work. When someone wants to use your facebook app, they have to login to Facebook, and give your app permission to use your information.
It's the same thing with Twitter now. You will need to get a twitter API key for your app, then when users first want to tweet, you will make an OAuth request with your API key to Twitter, which will have your users first login to Twitter, then authorize your application. After that process, you application will be able to "post" users tweets to their respective twitter accounts. how to possible in asp.net with c#.net code?
View 1 Replies
Sep 20, 2010
I need to write a webservice to be consumed by an application. The application will read the WSDL and provide me with the input output fields that I can utilise. The webservice output should be an array of string values as the output. I have taken a dataset and can output that as XML but I need to provide a description in WSDL what the output format will be and I cannot seems to get my head around to that. What I need is something similar to[URL] but do not how to write the WSDL to give me a clear input and output structure in the definition.
View 1 Replies