Documentation ¶
Index ¶
- type EMController
- type SutController
- func (s *SutController) GetAdditionalInfoList() []*staticstate.AdditionalInfo
- func (s *SutController) GetAllCoveredTargetInfos() ([]staticstate.TargetInfo, error)
- func (s *SutController) GetAllTargets() dto.AllTargetsDto
- func (s *SutController) GetFullObjectiveCoverage() dto.FullObjectiveCoverageDto
- func (s *SutController) GetTargetInfos(ids map[int]bool) ([]staticstate.TargetInfo, error)
- func (s *SutController) GetUnitsInfoDto() dto.UnitsInfoDto
- func (s *SutController) IsInstrumentationActivated() bool
- func (s *SutController) NewAction(dto dto.ActionDto)
- func (s *SutController) NewSearch()
- func (s *SutController) NewTest()
- type SutControllerInterface
- type SutHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EMController ¶
type EMController struct {
// contains filtered or unexported fields
}
func NewEMController ¶
func NewEMController(host string, port int, controller SutControllerInterface) *EMController
func (*EMController) StartTheControllerServer ¶
func (e *EMController) StartTheControllerServer() error
StartTheControllerServer starts controller. StartTheControllerServer always returns a non-nil error. After Close, the returned error is ErrServerClosed.
func (*EMController) StopTheControllerServer ¶
func (e *EMController) StopTheControllerServer() error
StopTheControllerServer stops SUT and EM controllers. StopTheControllerServer returns any error returned from closing the Server's underlying Listener(s).
type SutController ¶
type SutController struct {
SutControllerInterface
}
func NewSutController ¶
func NewSutController(sutControllerInterface SutControllerInterface) *SutController
func (*SutController) GetAdditionalInfoList ¶
func (s *SutController) GetAdditionalInfoList() []*staticstate.AdditionalInfo
GetAdditionalInfoList returns additional info for each action in the test. The list is ordered based on the action index.
func (*SutController) GetAllCoveredTargetInfos ¶
func (s *SutController) GetAllCoveredTargetInfos() ([]staticstate.TargetInfo, error)
func (*SutController) GetAllTargets ¶
func (s *SutController) GetAllTargets() dto.AllTargetsDto
func (*SutController) GetFullObjectiveCoverage ¶
func (s *SutController) GetFullObjectiveCoverage() dto.FullObjectiveCoverageDto
func (*SutController) GetTargetInfos ¶
func (s *SutController) GetTargetInfos(ids map[int]bool) ([]staticstate.TargetInfo, error)
func (*SutController) GetUnitsInfoDto ¶
func (s *SutController) GetUnitsInfoDto() dto.UnitsInfoDto
func (*SutController) IsInstrumentationActivated ¶
func (s *SutController) IsInstrumentationActivated() bool
IsInstrumentationActivated Check if instrumentation is on. returns true if the instrumentation is on
func (*SutController) NewAction ¶
func (s *SutController) NewAction(dto dto.ActionDto)
NewAction As some heuristics are based on which action (eg HTTP call, or click of button) in the test sequence is executed, and their order, we need to keep track of which action does cover what. @param dto is the DTO with the information about the action (eg its index in the test)
func (*SutController) NewSearch ¶
func (s *SutController) NewSearch()
NewSearch Re-initialize all internal data to enable a completely new search phase which should be independent of previous ones
func (*SutController) NewTest ¶
func (s *SutController) NewTest()
NewTest Re-initialize some internal data needed before running a new test
type SutControllerInterface ¶
type SutControllerInterface interface { SutHandler // GetInfoForAuthentication returns a list of valid authentication credentials, or nil if none is necessary GetInfoForAuthentication() []dto.AuthenticationDto // GetPreferredOutputFormat the format in which the test cases should be generated GetPreferredOutputFormat() dto.OutputFormat // IsSutRunning Check if the system under test (SUT) is running and fully initialized // returns true if the SUT is running IsSutRunning() bool // GetProblemInfo Depending on which kind of SUT we are dealing with (eg, REST, GraphQL or SPA frontend), // there is different info that must be provided // returns an instance of object with all the needed data for the specific addressed problem GetProblemInfo() problem.ProblemInfo }
type SutHandler ¶
type SutHandler interface { // StartSut Start a new instance of the SUT. // This method must be blocking until the SUT is initialized. // returns the base URL of the running SUT. (for example: "http://localhost:8080") StartSut() string // StopSut Stop the SUT StopSut() // ResetStateOfSUT Make sure the SUT is in a clean state (eg, reset data in database). // A possible (likely very inefficient) way to implement this would be to // call #StopSUT followed by #StartSUT ResetStateOfSUT() // SetHost Sets the Host to be used by the SUT. (for example: "localhost") SetHost(string) // SetPort Sets the Port to be used by the SUT. (for example: 8080) SetPort(int) }