Testing
🚦Gosip automated testing
Last updated
Was this helpful?
🚦Gosip automated testing
Last updated
Was this helpful?
In a clone or fork.
Create auth credentials store files in ./config
folder for corresponding strategies:
See .
Not provided auth configs and therefore strategies are ignored and not skipped in tests.
Create auth credentials store files in ./config/integration
folder for corresponding environments:
private.spo.json
private.2013.json // 2013 has its nuances with OData mod and not supported methods
API integration tests are mostly targeted to SharePoint Online and not regularly processed on the legacy versions of the platform so you can face some test exceptions which still should be escaped with t.Skip
and envCode != "spo"
condition:
Environment variables
SPAUTH_ENVCODE=code
environment variable switches target environments. spo
is a default one.
SPAPI_HEAVY_TESTS=true
turns on "heavy" methods, e.g. web creation.
Modify cmd/test/main.go
to include required scenarios and run:
Optionally, you can provide a strategy to use with a corresponding flag:
Configure environment variables:
SPAUTH_SITEURL
SPAUTH_CLIENTID
SPAUTH_CLIENTSECRET
SPAUTH_USERNAME
SPAUTH_PASSWORD
Branch
Coverage
Master
Dev
We are targeted to keep code coverage higher than 80% for API and Auth methods altogether.
Check .