|
|
Hello All,
I'm at work trying to write a Test Case script to run in VB6. The test case needs to test many many different combinations of parameters. For example, let's say I have 12 parameters, and I need to test the available types of data types that the parameters can take. Let's say that each parameter has 4 data types. I need to test every possible combination of every data type and parameter. If I were to do ALL of them, I would end up running over 20,000 test cases!!! However, with Pairwise testing, which only picks out the best possible combinations needed, the number of test cases dramatically reduces to about 25 or so. This software is available out on the net to get this result (www.satisfice.com), however, it must be run in DOS mode or through the command line. This makes my automation a problem, where a manual step must be taken to retrieve these combinations.
The idea looks like this...
Param1 Param2 Param3 Param4 ...
1 1 1 1
2 2 2 2
3 3 3 3
My question is...
Is there anyone out there that knows of, or knows where to find, an algorithm that can calculate the PairWise pairings? It could be in VB6 or VB.NET, I'll know how to convert the two.
Any insight or ideas would greatly help me.
Thank you for your time.
Matthew Hlavacek
Software Test Engineer - MCP
-- modified at 15:46 Friday 24th February, 2006
|
|
|
|
|
|
Hello again, just another question.
I've created a solution which contains an executable and a DLL. I want this DLL to be registered during installation. I create an installation project and drop the executable, which in turn carries along the DLL. To test the installation process, I create another folder in Common Files to hold the DLL, and I mark the DLL with the Register option to COM and COMRelativePath (I have tested both). But when I test the installation on a machine other than my development one, the DLL seems not to be registered. In fact, if I use gacutil on that machine after installation, everything works as expected.
What have I been missing?
Thanks in advance and best regards,
Juan Pedro Pérez
|
|
|
|
|
I have never in my life coded any Visual basic before the last few days, I am more of a C kinda guy, so I wonder if somebody could help me a little with some of my functions.
I am creating an ActiveX dll which is to be used with a C project of mine. The purpose of this dll is to perform all my Excel needs. I am having trouble getting the following to work:
Public Function CloseFile(FileName As String, Save As Boolean)
xlApp.Workbooks(FileName).Close savechanges:=Save
End Function
Whenever I call it I am confronted with a message box displaying "Subscript out of range".
Also with the following:
Public Function GetCellString(RowId As Integer, ColId As Integer) As String
GetCellString = xlSheet.Cells(RowId, ColId).Value
End Function
Most of the cells containing floating point numbers, but for simplicity I am returning a string. Problem is, I am only getting the whole number (before the decimal point) instead of a float.
Any help would be greatly appreciated.
|
|
|
|
|
waldermort wrote: xlApp.Workbooks(FileName).Close savechanges:=Save
This line doesn't make any sense.
I'm guessing "savechanges" is a member variable. It should be on the next line.
Also, the colon ':' allows you to write 2 lines of code on the same line. It turns 2 lines of code like this...
Dim index As Integer<br />
index = 1
And allows you to do this...
Dim index As Integer : index = 1
I don't think that was your intent. Although the := reminded me of Pascal. Ahhh... memories.
So, did you mean to do this?
xlApp.Workbooks(FileName).Close<br />
savechanges = Save
waldermort wrote: GetCellString = xlSheet.Cells(RowId, ColId).Value
I'm guessing that property "Value" is not returning a float. Otherwise, VB would have converted it to a floating point string for you.
Are there any other properties/functions that you can call?
|
|
|
|
|
|
I stand corrected. I've never seen := in VB before. Must be some kind of special syntax because it's not documented in any of my books.
I'm also thinking that your xlApp.Workbooks(FileName) is not returning a WorkBook object, which is why you're getting an exception.
|
|
|
|
|
Excel Spreadsheets determine the datatype of a column, by looking at
the content of the first few rows. If it determines that the column is text,
then all numeric cells/fields are returned as null and if the column is
determined as numeric, then all text fields are returned as null.
Divya Rathi
|
|
|
|
|
I determined that the function itself is causing the problem. You say that the datatype is determined by the first few rows. The first 2 rows and first column of this file contain text, the rest is composed entirly of floating point numbers. From this function:
Public Function GetCellString(RowId As Integer, ColId As Integer) As String
Dim val As Double
val = xlSheet.Cells(RowId, ColId).Value
MsgBox val
GetCellString = xlSheet.Cells(RowId, ColId).Value
End Function
|
|
|
|
|
My code now looks like this
Public Function GetCellString(RowId As Integer, ColId As Integer) As String
If VarType(xlSheet.Cells(RowId, ColId).Value) = vbString Then
GetCellString = xlSheet.Cells(RowId, ColId).Value
ElseIf VarType(xlSheet.Cells(RowId, ColId).Value) = vbDouble Then
GetCellString = CStr(xlSheet.Cells(RowId, ColId).Value)
End If
MsgBox GetCellString
End Function
It is detecting a double, but it is only converting the numbers before the decimal point.
|
|
|
|
|
How do I get the contents of the current field and row from a datagrid?
I have set up the code to run when I click on a record in the datagrid and this works until you sort the datagrid by clicking on the column headers.
dim test as string
test = TestGrid.CurrentRowIndex
COMPANY.Text = CODE_DataSet.Tables(CODE_TABLE).Rows(test).Item(0)
Any Idesas?
|
|
|
|
|
|
There is an ItemCommand event that fires when you click something in the datagrid
one of the arguments for that event is DataGridCommandEventArgs let's call it "e"
myItemCommand (object sender, DataGridCommandEventArgs e )
{
e.Item.DataItem[0]; /*This a DataRowViewRow*/
}
That is how you access a row in a datagrid.
Please let me know if I missunderstood your question or there's anything else I can help you with.
Greetings,
Felipe
|
|
|
|
|
OK I think I have got what I am looking for with:
Dim MyCell As DataGridCell
Dim MyRow As Integer
Dim MyCol As Integer
Dim MyData As String
MyCell = TestGrid.CurrentCell
MyRow = (MyCell.RowNumber)
MyCol = (MyCell.ColumnNumber)
MyData = CODE_DataSet.Tables(CODE_TABLE).Rows(MyRow).Item(MyCol)
COMPANY.Text =MyData
This will work as long as there is data in the cell I clicked on.
How do I test for NULL?
What variable type do I need to set MyData so I dont get a compiler error
"Cast from type DBNull to type String in not valid"
|
|
|
|
|
IF IsDBNull(MyData) Then
COMPANY.Text=""
Else
COMPANY.Text=MyData
End IF
!alien!
|
|
|
|
|
|
Can you show the settings for the adapter under Button1_Click?
|
|
|
|
|
Hey Felipe thanks for your response...
I'm not quite sure what you mean by your question? I can see all the properties for my adapter...
|
|
|
|
|
Excume, but I don't see your command, or connection? where is you data comming from?
|
|
|
|
|
Oh, it is coming from my dataset object SQL server. Here is my connection:
Provider=SQLOLEDB;Data Source=main;Integrated Security=SSPI;Initial Catalog=SpringBooking
|
|
|
|
|
That's OK but I what I need is too see where in your code you are setting this code, your command will help too. But as I already said I need to see in which event and what code you have there to make this works...
|
|
|
|
|
I am trying to pull out info with an SQL statement, and order it by date before it arrives at my datagrid.
sComm += "SELECT Fixtures.HomeTeam, Fixtures.AwayTeam, Fixtures.Date FROM Fixtures WHERE (Fixtures.HomeTeam ='" + TName + "' or Fixtures.AwayTeam = '" + TName + "')ORDER BY Fixtures.Date"
It keeps giving me the error:
Syntax error (missing operator) in query expression 'Fixtures.DateSELECT Fixtures.HomeTeam'.
Cheers.
|
|
|
|
|
Ok, let's try first with everything hardcode, can you this pls:
" SELECT Fixtures.HomeTeam, Fixtures.AwayTeam, Fixtures.[Date] "+
" FROM Fixtures WHERE (Fixtures.HomeTeam =' TName ' OR Fixtures.AwayTeam = ' TName ' ) "+
" ORDER BY Fixtures.[Date] "
If this works then you have data problem a not..
|
|
|
|
|
I am sooooo dumb. Do you know what my problem was. I had messed about with the button that called the fuction. And I forgot to remove something, and it was calling the fuction twice.
Which is why I was getting "Syntax error (missing operator) in query expression 'Fixtures.DateSELECT Fixtures.HomeTeam'."
'Fixtures.DateSELECT Fixtures.HomeTeam'."
Because this..^ is where the first call ends and the other begins.
DOH'
Thanks anyway, its working now.
|
|
|
|