Documentation
¶
Overview ¶
Package integration provides comprehensive integration tests for the GoPCA monorepo. These tests validate end-to-end workflows, cross-application communication, and ensure all components work together correctly.
Index ¶
- func AssertContains(t *testing.T, str, substr, msg string)
- func AssertError(t *testing.T, err error, msg string)
- func AssertNoError(t *testing.T, err error, msg string)
- func CheckFileExists(t *testing.T, path string)
- func CompareMatrices(a, b [][]float64, tolerance float64) error
- func CompareVectors(a, b []float64, tolerance float64) error
- func ExtractJSONFromOutput(output string) (map[string]interface{}, error)
- func GenerateTestMatrix(rows, cols int, seed float64) [][]string
- func ParseCSVOutput(output string) ([][]string, error)
- func RequirePlatform(t *testing.T, platform string)
- func SkipIfShort(t *testing.T)
- func SkipOnPlatform(t *testing.T, platforms ...string)
- type BenchmarkResult
- type SampleDataset
- type TestConfig
- func (tc *TestConfig) BenchmarkCLI(t *testing.T, args ...string) *BenchmarkResult
- func (tc *TestConfig) BuildCLI(t *testing.T)
- func (tc *TestConfig) CreateSampleDatasets(t *testing.T) map[string]*SampleDataset
- func (tc *TestConfig) CreateTestCSV(t *testing.T, name string, data [][]string) string
- func (tc *TestConfig) LoadJSONResult(t *testing.T, path string) map[string]interface{}
- func (tc *TestConfig) RunCLI(t *testing.T, args ...string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertContains ¶
AssertContains checks if string contains substring
func AssertError ¶
AssertError fails test if error is nil
func AssertNoError ¶
AssertNoError fails test if error is not nil
func CheckFileExists ¶
CheckFileExists verifies a file exists and is non-empty
func CompareMatrices ¶
CompareMatrices compares two matrices within tolerance
func CompareVectors ¶
CompareVectors compares two vectors within tolerance
func ExtractJSONFromOutput ¶
ExtractJSONFromOutput extracts JSON from mixed CLI output
func GenerateTestMatrix ¶
GenerateTestMatrix creates a deterministic test matrix
func ParseCSVOutput ¶
ParseCSVOutput parses CSV output from CLI
func RequirePlatform ¶
RequirePlatform skips test unless on specific platform
func SkipOnPlatform ¶
SkipOnPlatform skips test on specific platforms
Types ¶
type BenchmarkResult ¶
Benchmark helpers
type SampleDataset ¶
type SampleDataset struct {
Name string
Path string
Rows int
Cols int
HasMissing bool
HasGroups bool
HasTargets bool
}
CreateSampleDataset creates a standard test dataset
type TestConfig ¶
type TestConfig struct {
TempDir string
CLIPath string
Timeout time.Duration
Verbose bool
SkipSlow bool
TestDataPath string
}
TestConfig holds configuration for integration tests
func NewTestConfig ¶
func NewTestConfig(t *testing.T) *TestConfig
NewTestConfig creates a test configuration
func (*TestConfig) BenchmarkCLI ¶
func (tc *TestConfig) BenchmarkCLI(t *testing.T, args ...string) *BenchmarkResult
func (*TestConfig) BuildCLI ¶
func (tc *TestConfig) BuildCLI(t *testing.T)
BuildCLI builds the pca CLI for testing
func (*TestConfig) CreateSampleDatasets ¶
func (tc *TestConfig) CreateSampleDatasets(t *testing.T) map[string]*SampleDataset
func (*TestConfig) CreateTestCSV ¶
CreateTestCSV creates a CSV file with test data
func (*TestConfig) LoadJSONResult ¶
func (tc *TestConfig) LoadJSONResult(t *testing.T, path string) map[string]interface{}
LoadJSONResult loads and parses a JSON result file