package main import ( "testing" "github.com/kataras/iris/v12/httptest" ) func TestReadXML(t *testing.T) { app := newApp() e := httptest.New(t, app) expectedResponse := `Received: main.person{XMLName:xml.Name{Space:"", Local:"person"}, Name:"Winston Churchill", Age:90, Description:"Description of this person, the body of this inner element."}` send := `Description of this person, the body of this inner element.` e.POST("/").WithText(send).Expect(). Status(httptest.StatusOK).Body().Equal(expectedResponse) }