Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error message for invalid test suit #64

Closed
IharYudziankou opened this issue Feb 1, 2018 · 0 comments
Closed

Add error message for invalid test suit #64

IharYudziankou opened this issue Feb 1, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@IharYudziankou
Copy link

When expected response had been put into body section as json(see example below), runtime error happens.
Stack trace should be replaced with Error message with explanation of the reason of fail.

Piece of test suit json:

...
          "body": {
            "arr": [
              {
                "fld": "val"
              }
            ]
          }
...

Console output:

C:\ . . . \bozr.exe -i -H http://localhost/rest C:\ . . . \bug.suite.json
panic: runtime error: comparing uncomparable type map[string]interface {}

goroutine 19 [running]:
main.findDeep(0xc0421fc500, 0x1, 0x1, 0x781c20, 0xc0421a8570, 0x8000102)
	/Users/xander/Development/Sandbox/gotest/src/github.com/kajf/bozr/matchers.go:142 +0xae
main.findDeep(0xc0422b3ea0, 0x1, 0x1, 0x781c20, 0xc0421a8570, 0x1)
	/Users/xander/Development/Sandbox/gotest/src/github.com/kajf/bozr/matchers.go:137 +0x10d
main.SearchByPath(0x781c20, 0xc0421f4210, 0x75ec60, 0xc0420023c0, 0xc042008880, 0xc, 0xf09928, 0xc0422b1690, 0x410911)
	/Users/xander/Development/Sandbox/gotest/src/github.com/kajf/bozr/matchers.go:67 +0x17b
main.checkExpectedPath(0x781c20, 0xc0421f4210, 0x79ad80, 0xc0422c26e0, 0x0, 0x4d71c2)
	/Users/xander/Development/Sandbox/gotest/src/github.com/kajf/bozr/expect.go:131 +0xc5
main.responseBodyPathCheck(0xc0421f4150, 0x79ad80, 0xc0422c26e0, 0x7fe050, 0xc0421d4000, 0xc0422b1758)
	/Users/xander/Development/Sandbox/gotest/src/github.com/kajf/bozr/expect.go:233 +0x15f
main.BodyExpectation.check(0xc0421a8540, 0xc0421f4150, 0xc0421be320, 0x95)
	/Users/xander/Development/Sandbox/gotest/src/github.com/kajf/bozr/expect.go:109 +0x11e
main.call(0xc04200887c, 0x2, 0xc0421a8270, 0xc042008208, 0x3, 0xc04200c200, 0x37, 0xc0421a83c0, 0x0, 0x0, ...)
	/Users/xander/Development/Sandbox/gotest/src/github.com/kajf/bozr/main.go:276 +0x8a2
main.runSuite(0xc042080057, 0xe, 0xc04200887c, 0x2, 0xc0421a88d0, 0x1, 0x1, 0x0, 0x0, 0x0)
	/Users/xander/Development/Sandbox/gotest/src/github.com/kajf/bozr/main.go:181 +0x55d
main.runSuites(0xc04203e300, 0xc04203e360, 0xc042055910, 0x7fe068)
	/Users/xander/Development/Sandbox/gotest/src/github.com/kajf/bozr/parallel.go:45 +0xf7
created by main.RunParallel
	/Users/xander/Development/Sandbox/gotest/src/github.com/kajf/bozr/parallel.go:19 +0xc7

Process finished with exit code 2
@dpfg dpfg added the bug label Feb 2, 2018
@dpfg dpfg added this to the 0.8.12 milestone Feb 2, 2018
@dpfg dpfg self-assigned this Feb 11, 2018
@dpfg dpfg closed this as completed in 30ab5ad Feb 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants