I am working on C# winform, i have ToolStrip in which have several ToolStripButton's. I am using CodedUI for testing. The problem which i am facing is i am unable to find the ToolStripButton in CodedUI test. So can any one tell we whether there is support for ToolStripButton of winform? if yes, then how can i find ToolStripButton, i.e. do i need to set any property to do so? I simply want to access the ToolStripButton. Thank you in advance! :)
jeudi 27 juillet 2017
Unable to identify the ToolStripButtons of ToolStripMenu in CodedUI in C# WinForms
make tcpflood throws error
I am following this link ( http://ift.tt/2kt2que ) to send messages to rsyslog.
I have cloned the git repository of rsyslog http://ift.tt/2kMEDla
While following the link http://ift.tt/2kt2que , I am getting below error while executing "make tcpflood"
root1@atratus06:~/Debashish/rsyslog/tests$ make tcpflood
cc tcpflood.c -o tcpflood
tcpflood.c:86:20: fatal error: config.h: No such file or directory
#include "config.h"
^
compilation terminated.
make: *** [tcpflood] Error 1
Can you please help me with the error, your help will be really appreciated.
Is it a bad practice to have very long Mocha test?
When doing unit test, each case tends to be short and exclusive. But now I'm writing end-to-end tests with Selenium, thus, I have long scenarios which contain several closely related steps, for instance:
- User register
- User Login
- User post an article
- User edit that article
Should any error is caught I didn't expect other test to continue. So, seems I should put all of above in just one single it block. But of course this will make the block very long, and I have to set a big timeout, expect long finishing time etc.
Is this a bad practice?
how to run a Load Test automatically on tfs
i was trying the whole day to get it run but i was unsuccessful. maybe someone here already did it and could tell me what i must do to get it run.
locally it works perfect but on the tfs i get errors like:
2017-07-26T11:53:31.9384935Z ##[error]System.Management.Automation.MethodInvocationException: Exception calling "FindServicePoint" with "1" argument(s): "This operation is not supported for a relative URI." ---> System.InvalidOperationException: This operation is not supported for a relative URI.
2017-07-26T11:53:31.9384935Z ##[error] at System.Uri.get_IsDefaultPort()
2017-07-26T11:53:31.9384935Z ##[error] at System.Net.ServicePointManager.MakeQueryString(Uri address)
2017-07-26T11:53:31.9384935Z ##[error] at System.Net.ServicePointManager.FindServicePointHelper(Uri address, Boolean isProxyServicePoint)
2017-07-26T11:53:31.9384935Z ##[error] at System.Net.ServicePointManager.FindServicePoint(Uri address, IWebProxy proxy, ProxyChain& chain, HttpAbortDelegate& abortDelegate, Int32& abortState)
2017-07-26T11:53:31.9384935Z ##[error] at CallSite.Target(Closure , CallSite , Type , Object )
2017-07-26T11:53:31.9540903Z ##[error] --- End of inner exception stack trace ---
2017-07-26T11:53:31.9540903Z ##[error] at System.Management.Automation.ExceptionHandlingOps.ConvertToMethodInvocationException(Exception exception, Type typeToThrow, String methodName, Int32 numArgs, MemberInfo memberInfo)
2017-07-26T11:53:31.9540903Z ##[error] at CallSite.Target(Closure , CallSite , Type , Object )
2017-07-26T11:53:31.9540903Z ##[error] at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
2017-07-26T11:53:31.9540903Z ##[error] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2017-07-26T11:53:32.2978722Z ##[error]System.UriFormatException: Invalid URI: The hostname could not be parsed.
2017-07-26T11:53:32.2978722Z ##[error] at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
2017-07-26T11:53:32.2978722Z ##[error] at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.CheckProtocol(Uri uri)
2017-07-26T11:53:32.2978722Z ##[error] at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetRequest(Uri uri)
2017-07-26T11:53:32.2978722Z ##[error] at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
2017-07-26T11:53:32.2978722Z ##[error] at System.Management.Automation.CommandProcessor.ProcessRecord()
2017-07-26T11:53:32.4385116Z ##[error]System.Management.Automation.RuntimeException: You cannot call a method on a null-valued expression.
2017-07-26T11:53:32.4385116Z ##[error] at CallSite.Target(Closure , CallSite , Object , String )
2017-07-26T11:53:32.4385116Z ##[error] at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
2017-07-26T11:53:32.4385116Z ##[error] at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
2017-07-26T11:53:32.4385116Z ##[error] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
i never used this FindServicePoint and also can't find it in my test-project and i haven't any relative URI.
thanks for every help
mercredi 26 juillet 2017
Does IBM's Rational Functional Tester (v 9.1) test web pages?
I would like to know if I can access a website using a browser for testing purposes using RFT. For practice, I'm trying to use www.google.com.For example, can I automate a Google search using RFT?
Getting error while trying to implement Recursion with arrays
Im working on a school project where I have to implement recursion with arrays and I have done everything but im getting a null error when I am running it. The error points to the Recursion class on Line:
result += packetList[n].idNumber + " " + packetList[n].weight + " " + packetList[n].Destination;
I tried tracing the recursion method to see if it would actually make sense and its looks solid but i'm still getting a null error.
Recursion Class:
import java.io.*;
public class Recursion
{
public String toString(Packet[] packetList, int n)
{
String result = "";
if (n < 0)
{
return result;
}
result += packetList[n].idNumber + " " + packetList[n].weight + " " + packetList[n].Destination; // Uncomment if you want the values from last-to-first (last index to 0 index)
result += toString(packetList, n-1);
//result += packetList[n].idNumber + " " + packetList[n].weight + " " + packetList[n].Destination; // Uncomment if you want the values from first-to-last (0 index to last index)
return result;
}
}
Packet Class
public class Packet
{
public int idNumber;
public double weight;
public String Destination;
public Packet(int id, double w, String D)
{
idNumber = id;
weight = w;
Destination = D;
}
public boolean isHeavy()
{
if (weight > 10)
return true;
else
return false;
}
public String toString()
{
return idNumber + " " + weight + " " + Destination;
}
public double getWeight()
{
return weight;
}
public String getDestination()
{
return Destination;
}
}
Test Class
import java.io.*;
import java.util.*;
import java.util.Scanner;
public class TestPackages
{
public static void main (String[] args) throws IOException
{
Packet[] packetList = new Packet[100];
int idNumber;
double weight;
String Destination;
Scanner fileInput;
fileInput = new Scanner (new File("packetData.txt"));
int counter = 0;
while (fileInput.hasNextLine())
{
idNumber = fileInput.nextInt();
weight = fileInput.nextDouble();
Destination = fileInput.nextLine();
Packet myPacket = new Packet (idNumber, weight, Destination);
packetList[counter++] = myPacket;
}
Recursion recursion = new Recursion();
System.out.println(recursion.toString(packetList, packetList.length - 1));
recursion.displayHeavyPackages(packetList, packetList.length - 1);
recursion.displayPacketsToDest(packetList, packetList.length - 1, "CT");
recursion.countPacketsToDest(packetList, packetList.length - 1, "CT");
}
}
java.lang.NumberFormatException: For input string: "" (Error when running `sbt test`)
I got this strange error when running "sbt test" on my Mac OS X(10.12.3) with Play 2.3.x, Scala (2.10.x). Java version on my local is java version "1.8.0_131".
I would really appreciate if someone could give me a quick pointer on the cause of this?
Error stack trace looks something like
[error] NumberFormatException: : For input string: "" (ProxyUtils.java:159)
[error] com.ning.http.util.ProxyUtils.createProxyServerSelector(ProxyUtils.java:159)
[error] com.ning.http.client.AsyncHttpClientConfig$Builder.build(AsyncHttpClientConfig.java:1132)
[error] play.api.libs.ws.ning.NingAsyncHttpClientConfigBuilder.build(NingAsyncHttpClientConfigBuilder.scala:37)
[error] play.api.libs.ws.ning.NingWSAPI.buildAsyncClientConfig(NingWS.scala:563)
[error] play.api.libs.ws.ning.NingWSAPI.newClient(NingWS.scala:520)
[error] play.api.libs.ws.ning.NingWSAPI$$anonfun$client$1.apply(NingWS.scala:543)
[error] play.api.libs.ws.ning.NingWSAPI$$anonfun$client$1.apply(NingWS.scala:540)
[error] play.api.libs.ws.ning.NingWSAPI.client(NingWS.scala:538)
[error] play.api.libs.ws.ning.NingWSAPI.url(NingWS.scala:553)
[error] play.api.libs.ws.WS$.url(WS.scala:129)