You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, All:
As we know, Golang built-in a nice test solution now, but can't export test case without real to run.
In fact We're often want to export test case to a nice format then import to another test case management tool.
So, I am asking for a new feature to export test cases.
What did you do?
The test case sample
///coment for test functionfuncTestFooBar(t*testing.T) {
///Comment for test case At.Run("Test Case A",func (t*testing.T) {
///Comment for test case 1t.Run("Test Case 1",func (t*testing.T) {
})
t.Run("Test Case 2",func (t*testing.T) {
})
})
t.Run("Test Case B",func (t*testing.T) {
t.Run("Test Case 1",func (t*testing.T) {
})
t.Run("Test Case 2",func (t*testing.T) {
})
})
}
What did you expect to see?
[
{
"name" : "TestFooBar",
"comment" : "coment for test function",
"sub" : [
{
"name" : "Test Case A",
"comment" : "Comment for test case A",
"sub" : [
{
"name" : "Test Case 1",
"comment" : "Comment for test case 1",
},
{
"name" : "Test Case 2"
}
]
},
...
]
}
]
What did you see instead?
can't do it now.
The text was updated successfully, but these errors were encountered:
toothrot
changed the title
feature request - export all test case into human friendly format.
testing: feature request - export all test case into human friendly format.
Mar 10, 2020
toothrot
changed the title
testing: feature request - export all test case into human friendly format.
proposal: testing: export all test case into human friendly format.
Mar 10, 2020
A Go test with sub-tests is not a graph or table, though. You can have arbitrary code and logic. For example, this is common:
for _, test := range testTable {
t.Run(test.name, func(t *testing.T) {
// ...
})
}
This is why go test -list only lists top-level tests, and not sub-tests. Listing all sub-tests requires actually executing the tests, and might not show subtests which aren't meant to run on your platform.
Feature Request - Test Case Export
Hi, All:
As we know, Golang built-in a nice test solution now, but can't export test case without real to run.
In fact We're often want to export test case to a nice format then import to another test case management tool.
So, I am asking for a new feature to export test cases.
What did you do?
The test case sample
What did you expect to see?
What did you see instead?
can't do it now.
The text was updated successfully, but these errors were encountered: