Sample application

This sample application should allow to create all possible data constellations for the sensors in order to allow for easy and quick manual testing of the application. The current samples (calculator) are focussing on the usage of inspectIT. The dvdstore application is quite big thus to cumbersome to use.

The application should use a predefined workthrough without any randomness when it comes to testing features (timings can vary).

Structuring

We decided that we use testng for structuring of the test. So we have a Test class for each feature. As the tests also need additional configuration for inspectIT, we will put a configuration file with the test and integrate it in the inspectit.config via $include.

Features to test

The testdata should be diverse, that means that for example the session parameters should not only just be a String, but also a Collection/Map or a <null> value, and empty String or the like.

StatusSensorDetailWhat does this mean for the dataWhich package tests thatWhich test
(tick)HTTPSession parameters

 

HttpFeatures
  • httpSessionParametersGet
  • httpSessionParametersPost
(tick)HTTPParameters HttpFeatures
  • httpGetParameters
  • httpsGetParameters
  • httpPostParameters
  • httpsPostParameters
(tick)HTTPHeaders HttpFeatures
  • httpHeadersGet
  • httpHeadersPost
(tick)HTTPURL aggregation
  • Different URLs need to be executed
  • Different methods must be used (GET, POST)
HttpFeatures
  • httpGetDifferentURLs
  • httpPostDifferentURLs
(tick)HTTPUse case aggregation
  • Different usecase headers must be provided as otherwise the aggregation cannot be tested
  • Multiple requests with one header must be provided
HttpFeatureshttpUsecaseHeaderAggregation
(tick)HTTPin invocation sequenceHTTP is always within invocation sequenceInvocationSequenceinvocationSequenceSensortests
(warning)HTTPRegular expression matchingDefine a group that matches the URI. Comes with 1.5  
(warning)HTTPRegular expression matchingDefine a regex in a way that only some of the URIs matches and some do not match. Comes with 1.5  
(tick)SQLprepared statement SQLFeaturespreparedStatement
(tick)SQLunprepared statement SQLFeaturesunpreparedStatement
(tick)SQLprepared statement bind values SQLFeaturespreparedStatementWithBindParameters
(tick)SQLSQL in invocation sequence SQLFeaturespreparedStatementInInvocationSequence
(tick)TimerTimer with charting
  • This methods needs to be invoked over the runtime of the test so that we can have a nice graph over time
  • Has to be specified in the config-File
TimertimerWithCharting
(tick)TimerTimer without charting TimertimerWithoutCharting
(tick)Invocation SequenceAll sensors without an invocation sequence InvocationSequencenoInvocationSequenceSensortests
(tick)Invocation SequenceAll sensors within an invocation sequence
  • Build more meaningful invocation sequence with a bunch of different sensors
InvocationSequenceinvocationSequenceSensortests
(tick)Invocation SequenceMinDuration setting
  • Have one invocation sequence use a min duration and use different lasting invocation sequences
InvocationSequencetestMinDurationInvocationSequence
(tick)Invocation SequenceStepping Feature
  • Provide multiple instances of a method within one invocation sequence
  • Provide multiple instances of a SQL in one invocation sequence
InvocationSequence
  • testSteppingFeature
  • testSteppingFeatureSQL
(tick)Context capturingReturn value

Currently context capturing is only shown in invocation sequences, so we need an invocation sequence for that

ContextCapturingTestcontextCapturingTest
(tick)Context capturingField valueCurrently context capturing is only shown in invocation sequences, so we need an invocation sequence for thatContextCapturingTestcontextCapturingTest
(tick)Context capturingParameter valueCurrently context capturing is only shown in invocation sequences, so we need an invocation sequence for thatContextCapturingTestcontextCapturingTest
(tick)Context capturingNavigation in fields, parameters and return valuesCurrently context capturing is only shown in invocation sequences, so we need an invocation sequence for thatContextCapturingTestcontextCapturingTest
(tick)Context capturingMulti-line string parameter valueCurrently context capturing is only shown in invocation sequences, so we need an invocation sequence for thatContextCapturingTestcontextCapturingTest
(tick)Exception sensorMake exception class hierarchyMake sure we monitor exception that is extended from other monitored exceptionThrowExceptions
  • throwLevel1SubException
  • throwLevel2SubException
(tick)Exception sensorCause exceptionMake cause exception also setCauseExceptionthrowCauseException
(tick)Exception sensorProvide a hierarchy of created, passed and handledProvide a testcase in which an exception is created, passed by some other exception and handled by a third method.ThrowExceptionspassingExceptions
(tick)GeneralClass in the default package DefaultPackagesTestFileSimpleOutput

(tick)

GeneralClass that is exluded by the exclude filters
  • That means that this class does not show
  • Build an invocation sequence with an entry that shows, followed by one that does not show, followed by one that shows
NotExcludedLevel1callExcludedClass

(tick)

GeneralInstrument Java Core classes CoreClassTestcoreClassTest
(tick)Plattform SensorsHave all enabledJust enable them in the basic configuration file  
(error)StorageHave all data that the other tests produce once in a storage and once without a storage   
(error)StorageHave the different states of storages availableA storage in open, closed, ...  
Key:
(info)(error)(warning)(tick)
minor bugsmajor bugs or non-existingwork in progressfinished task