public static void ClassInitialize() { //get a OSS client object _ossClient = OssClientFactory.CreateOssClientUseHttps(); //get current class name, which is prefix of bucket/object _className = TestContext.CurrentContext.Test.FullName; _className = _className.Substring(_className.LastIndexOf('.') + 1).ToLowerInvariant(); //create the bucket _bucketName = OssTestUtils.GetBucketName(_className); _ossClient.CreateBucket(_bucketName); }