Forum Discussion
Hi Kostja,
You can create a custom field of the following types:
- Choice List (Based on SQL) – On-Premises feature. You can enter a SQL statement that will return a list of items based on your query. These display in a choice list drop down. (Note: This type of field is not compatible with Fast Edit or Import.) See details: Create Custom Fields based on SQL Queries.
- Choice List (Based on Another Field) – This allows you to create a custom field that derives the items in the combo box from another feature area. Please see my sample video about adding a release title field to test sets: http://screencast.com/t/TbsVBHovz.
But, note that you cannot add the Run Time field to a Test library screen. The Run Time value is associated with a Test Run, not a Test (one test can has several test runs). For a Test you can add the Avg Run Time field, which show average run time value for a particular test: http://screencast.com/t/rV0uRzF0PhR.
Anastasia
Customer Care Team
Hey Anastasia,
unfortunately your suggestions were not the solution i was searching for, so now i retrieve the 'Last Run Time' with a more complicated SQL query within the test (just wanted to make it easy to get the value of the last run ).
Now it looks like this:
var func = arguments.callee.toString().match(/function ([^\(]+)/)[1]; var Cmd = ADO.CreateADOCommand(); Cmd.ConnectionString = "Driver={SQL Server};Server=Server\\SQLEXPRESS;Database=SoftwarePlanner;Uid=uid;Pwd=pwd;"; Cmd.CommandText = "select TestRunItemRunTimeFormated from dbo.View_TestRunsAdHoc where TestRunItemDateFinished = (select max(TestRunItemDateFinished) from dbo.View_TestRunsAdHoc where TestRunItemTestName = (select Title from dbo.View_TestAutomations where EntryPoint like '%"+ func +"'))"; var RecSet = Cmd.Execute(); var rsRT = RecSet.Fields.Item(0).Value;
Although thank you for reply, still helpful for other purposes.
Related Content
- 2 years ago
- 3 years ago
- 2 years ago