我尝试将配置p12文件添加JMeter 3.3到网站.我在system.properties文件中添加了以下行:
javax.net.ssl.keyStoreType=pkcs12
javax.net.ssl.keyStore=C:\certs\mycert.p12
javax.net.ssl.keyStorePassword=mypassword
Run Code Online (Sandbox Code Playgroud)
之后我重新开始JMeter,但得到了同样的错误,javax.net.ssl.SSLHandshakeException.我p12用keytool 转换了文件,jks并通过替换以前的行将以下行添加到同一文件中.
javax.net.ssl.keyStore=C:\certs\mycert.jks
javax.net.ssl.keyStorePassword=mypassword
Run Code Online (Sandbox Code Playgroud)
在这种情况下,错误消息也是相同的:
响应代码:非HTTP响应代码:javax.net.ssl.SSLHandshakeException响应消息:非HTTP响应消息:收到致命警报:handshake_failure
我使用HTTP Client 4作为HTTP Samplers的实现.当我将相同的证书导入浏览器时,它正常工作.
我也尝试遵循本教程:如何配置JMeter以使用客户端SSL
我有一个JMeter测试用例,其中包含SOAP附加到这些文件的各种文件的请求.因此,使用不同的文件发送相同的请求.它与某些文件一起正常工作,但它提供HTTP 500了以下消息的错误代码:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Problems creating SAAJ object model</faultstring></soap:Fault></soap:Body></soap:Envelope>
Run Code Online (Sandbox Code Playgroud)
我检查了原始请求,发现它在语法上是正确的,唯一的区别是文件,它以Base64编码格式附加.
我已经修改,向正在运行的容器添加了一些额外的应用程序,现在我想将它推送到 Docker Hub。我已经这样标记我的图像:
docker tag hellodocker:mytag <myuser>/hellodocker:mytag
推送过程是成功的,但在拉动和运行之后我看到,它只包含基本图像,我已经用完了,所以安装的应用程序没有“提交”。
当我尝试使用以下代码创建身份验证标头时.我收到错误消息"AADSTS70002:验证凭据时出错.AADSTS50012:提供了无效的客户端密码." 现在,我确信,我在代码中使用的秘密与我的AAD app注册中使用的秘密不匹配.任何人都可以通过我的应用程序注册或如何在我的O365帐户目录中添加新的应用程序标识符来帮助我了解客户机密.
private string GetAuthenticationHeader(AuthenticationInformation authenticationInformation){
try{
return RetryHelper.InvokeWithRetries(() =>
{
var clientCredential = new ClientCredential(authenticationInformation.ClientId, authenticationInformation.AppSecret);
var ac = new AuthenticationContext(authenticationInformation.Authority);
AuthenticationResult ar = ac.AcquireToken(authenticationInformation.Resource, clientCredential);
return ar.CreateAuthorizationHeader();
});
}
catch (Exception ex){
return ex.Message;
}
}
Run Code Online (Sandbox Code Playgroud) 我有一个WebDriver基于Java测试套件,我尝试用Jenkins执行.项目已导入,构建成功.
在执行测试期间,我得到以下信息:
运行TestRunner使用以下命令配置TestNG:org.apache.maven.surefire.testng.conf.TestNG652Configurator@2437c6dc org.openqa.selenium.firefox.NotConnectedException:45000 ms后无法在端口7055上连接到主机127.0.0.1.Firefox控制台输出
似乎没有找到二进制文件,但它位于给定的路径中.
测试失败:runBeforeTest(TestRunner):无法连接到端口7055上的二进制FirefoxBinary(/ home/user1/Desktop/firefox/firefox-bin); 过程输出如下:(..)
在执行之前我启动了一个X服务器.
Xvfb :19 -screen 0 1024x768x16 &
export DISPLAY=:19
firefox &
Run Code Online (Sandbox Code Playgroud)
版本:
Ubuntu 16.04.3
Selenium 2.53.1
Firefox 55.0
Jenkins 2.60.3
Run Code Online (Sandbox Code Playgroud) 我创建了一个带有密码的管理员用户,其中包含一个特殊字符.Gitea的安装很成功,但我无法登录.我无法获得新密码,因为它说:
对不起,注册邮件确认已被禁用.
我试过命令gitea admin change-password,但命令无法识别.
我尝试从中的测试用例生成负载测试SoapUI。它有很多测试步骤,前10个步骤涵盖了登录过程。LoadTest在Groovy脚本中停止,该脚本应该从上一个测试步骤的输出中获取参数值。当直接执行时,它可以正常工作,但是当以a执行时,它会给出错误LoadTest:
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.String# . Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class [B] [class [C] [class java.lang.String] groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.String# . Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class [B] [class [C] [class java.lang.String] error at line: 5
Run Code Online (Sandbox Code Playgroud)
Groovy 导致上述错误的脚本:
def tc1 = testRunner.testCase.getTestStepAt(context.currentStepIndex-1);
String rawData = new String(tc1.testRequest.response.rawResponseData);
Reger reger …Run Code Online (Sandbox Code Playgroud) 我Java用来阅读文件列表。其中一些具有不同的编码,ANSI而不是UTF-8. java.util.Scanner无法读取这些文件并获得空输出字符串。我尝试了另一种方法:
FileInputStream fis = new FileInputStream(my_file);
BufferedReader br = new BufferedReader(new InputStreamReader(fis));
InputStreamReader isr = new InputStreamReader(fis);
isr.getEncoding();
Run Code Online (Sandbox Code Playgroud)
我不确定如何更改字符编码以防万一ANSI。UTF-8 和 ANSI 文件混合在同一文件夹中。为此,我尝试使用 Apache Tika。获得文件编码后,我使用Scanner,但输出为空。
Scanner scanner = new Scanner(my_file, detector.getCharset().toString());
line = scanner.nextLine();
Run Code Online (Sandbox Code Playgroud) 我想改成java.awt.Point一些可以取代它的类似的类.这对我来说是一个非常难的问题,因为Dalvik VM无法解析AWT类,但是给定的java算法使用它.确切的错误消息:
点无法解析为类型
我也尝试从java.util导入类,但没有成功.
@BeforeSuite在之前@BeforeMethod执行之后停止执行。(alwaysRun=true)我在每种情况下都使用。它不会执行套件中的其他测试用例。我收到错误消息:
测试被忽略。
@BeforeMethod(alwaysRun=true)
public void launchBrowser() throws Exception
{
browser = BrowserFactory.launch(BrowserType.CHROME);
logger.info("Browser Launched");
}
@AfterMethod(alwaysRun=true)
public void closeBrowser() throws Exception
{
browser.close();
}
@AfterSuite(alwaysRun=true)
public static void tearDown() throws Exception
{
Reporter.generateReport();
SDK.cleanup();
}
Run Code Online (Sandbox Code Playgroud)