问题标签 [dbfit]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
unit-testing - 即使实际值和预期值相同,FitNesse 值比较也会失败
我在 SQL Server 中运行一个返回一些计算值的函数。当使用 dbFit 在 FitNesse 中测试结果时,它声称这些值不一样(请参见下面的屏幕截图)。
这些值作为浮点数返回,并且在比较所有小数时失败 - 即使它只显示两个。有没有办法限制比较的小数范围?
java - 是否有任何自动化工具可以为 java 批处理应用程序执行功能测试?
我有将数据写入数据库的 Java 批处理应用程序。我想要一个自动化测试,它将预期输出与数据库中的数据进行比较。我使用 DBfit 完成了这个过程并且工作得很好,除了我必须在 excel 电子表格中输入我的预期数据,然后复制并粘贴到 dbfit 并格式化它,所以这是一个我想避免的手动步骤。
是否有任何自动化工具可以为 java 批处理应用程序执行功能测试?
java - SQLServerException while trying to use Fitnesse and DbFit and SQL Server
I am new to both (Java) FitNesse and SQL Server, I want to have a basic SQL test working with DbFit,
I have the following in root:
I have the following in my HelloWorldTest,
What I have tried:
- I have double checked my SQLExpress username and password and the SqlServer instance is at localhost.I doubt this is a firewall issue. (My understaning of firewall is quite weak admittedly.)
- Looking at Sql Server Configuration Manager (SSCM),
- I see that "SQL Server (SQLEXPRESS) is running as Process with ID 2316,
- Using the PowerShell command "nestat -a -no | Select-String 2316", I see that the process on port 55618.
- In SSCM, I then create alias called "LOCALSQLEXPRESS" in both "SQL Native Client 11.0 Configuration (32bit)" and "SQL Native Client 11.0 Configuration" as I have no idea what my JDBC is using. (Apparently, JDBC for SQL Server does not support named instance, I got an exception telling me so when I was trying to connect to \localhost\SQLEXPRESS directly) I have also enabled "TCP/IP" and "Shared Memory" in "Protocols for SQLEXPRESS".
I am getting the following error when I run the test:
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host LOCALSQLEXPRESS, port 1433 has failed. Error: "null. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
(Note the port number of 1433, despite my alias point to port 55618.)
This is my first post at StackOverflow, please excuse any silliness. Can anyone shed any light?
fitnesse - 如何在 FitNesse + DbFit 中获取 sql 查询的输出?
我正在尝试使用 ie 在 DBfit 中获取 sql 查询输出,!|Execute|select * from abc|
但不知道它将如何在 DBfit 中显示。
mysql - DbFit 的初始设置不起作用
我是使用版本 2.0.0-RC5 的 DbFit 和 Fitnesse 新手。我完全按照 github 教程中的设置说明进行操作。我尝试了许多不同的方法来让它工作,但最终得到了错误。
教程:http ://dbfit.github.io/dbfit/docs/getting-started.html
这是 HelloWorldTest 的样子:
当我运行测试时,我得到:
我已经四处寻找答案,但没有运气。任何帮助将非常感激。谢谢!
sql-server - DbFit 中的大型数据集比较超时
查询是按货币分组的前 500 个帐户余额的总和,用于来自新 SQL 2012 服务器和现有服务器的比较查询,以验证新 2012 服务器中没有变化。
设置超时属性为 |set option|command|900| 并无济于事。
以下是错误的摘录:
System.Data.SqlClient.SqlException (0x80131904):超时已过期。在操作完成之前超时时间已过或服务器没有响应。在 System.Data.SqlClient.SqlConnection.OnError(SqlException 异常,布尔 breakConnection) 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() 在 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,SqlCommand cmdHandler,SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 在 System.Data.SqlClient.SqlDataReader.SetMetaData(_SqlMetaDataSet metaData, Boolean moreInfo) 在 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 在系统.Data.SqlClient.SqlDataReader。
我试图将要检查的行数从 500 减少到 300,这似乎可行,但是大型数据集将是突出任何差异的理想选择。
我也在考虑将查询更改为其他内容,以将其分解为较小的结果集或创建替代
查询如下,如果有人有更好的解决方案来优化查询:
有没有人有上述以外的替代品
testing - Fitnesse 和 dbFit:如何在 SQL 查询中转义冒号
当我将 dbFit 与 Fitnesse 一起使用时,我遇到了在 SQL 查询中转义冒号和破折号的问题。
这样的声明不起作用:
我需要用其他一些可接受的字符替换冒号和破折号,例如。
你知道如何在不使用第二种方法的情况下正确解决它吗?
干杯,福斯拉菲
testing - Fitnesse/dbFit :未验证的列
如果可以创建仅包含行描述且未经 dbFit 验证的列,您是否有任何想法。例如,我有一个这样的表:
查询返回一列,并且只应验证第一列。另一个在验证过程中被跳过。
你知道这是否可能吗?现在我收到错误:java.lang.Exception: Unknown column description at dbfit.fixture.RowSetFixture.findColumn(RowSetFixture.java:40)
谢谢你的帮助,foxrafi
dbfit - 如何使用 DBFIT 对“比较存储的查询”夹具的结果进行排序?
是否可以在 DBFIT 中对“比较存储的查询”夹具的结果进行排序,以便失败的结果返回到结果网格的顶部?
谢谢!
sql-server - DBFit jdbc.SQLServerException: Incorrect syntax near the keyword 'as'
I'm a stackoverflow newbie and also new to DBFit. I have already done a successful DBFit test, however in one of my new tests, I'm getting an exception error:
Here is part of the fit page I'm testing:
I tried without the 'AS', just 'BrokerCode BC' to alias the column and it still has the incorrect syntax exception error. If I remove the alias, just 'BrokerCode' then the Fit Test passes. If I run the compare query in MSSSMS, all 3 versions work.
Note that the example I have has the same column name BrokerCode in the second table just to make the union work without aliasing. But I do have other columns that have different column names, thus I need to make aliasing work.
I have just recently downloaded the latest DBFit version and I'm using miscrosoft's sqljdbc4.jar as jdbc driver.
What is wrong with the query and how can column alias be specified in DBFit with MSSQL?
Thanks in advance!