Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds support for test cases #289 #294

Merged
merged 19 commits into from
Jan 21, 2025
Merged

feat: adds support for test cases #289 #294

merged 19 commits into from
Jan 21, 2025

Conversation

srinandan
Copy link
Collaborator

No description provided.

@srinandan srinandan linked an issue Oct 7, 2024 that may be closed by this pull request
deepgoel17
deepgoel17 previously approved these changes Dec 11, 2024
Copy link
Collaborator

@deepgoel17 deepgoel17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, i have tested scaffold cmd and it seems the testcase file is generated is not correct

  • It doesn't have the api_trigger configure with it.
  • It has an extra field triggerConfig due to which the testCase upload on UI fails with the testcase file generated via CLI.

testcase file generated by CLI:

{
	"displayName": "testcase1",
	"testTaskConfigs": [
		{
			"assertions": [
				{
					"assertionStrategy": "ASSERT_EQUALS",
					"parameter": {
						"key": "output",
						"value": {
							"stringValue": "2"
						}
					}
				}
			],
			"mockConfig": {
				"mockStrategy": "NO_MOCK_STRATEGY"
			},
			"task": "FieldMappingTask",
			"taskConfig": {},
			"taskNumber": "1"
		}
	],
	"triggerConfig": {}
}

Testcase file downloaded via UI

{
  "name": "projects/46733324969/locations/us-west1/integrations/deep-testcase/versions/193d4629-4663-4004-af9d-207ea1a83b02/testCases/5aa8fab5-ab51-4b67-a55d-de4c42d01694",
  "displayName": "testcase1",
  "triggerId": "api_trigger/deep-testcase_API_1",
  "testTaskConfigs": [{
    "taskNumber": "1",
    "mockConfig": {
      "mockStrategy": "NO_MOCK_STRATEGY"
    },
    "assertions": [{
      "assertionStrategy": "ASSERT_EQUALS",
      "parameter": {
        "key": "output",
        "value": {
          "stringValue": "2"
        }
      }
    }],
    "task": "FieldMappingTask"
  }],
  "creatorEmail": "[email protected]",
  "createTime": "2024-07-17T17:14:56.025525Z",
  "lastModifierEmail": "[email protected]",
  "updateTime": "2024-07-17T17:17:55.605793Z",
  "lockHolderEmail": "[email protected]"
}

@deepgoel17 deepgoel17 dismissed their stale review December 11, 2024 17:39

While testing found some issue in the testcase file generated via CLI

@srinandan srinandan requested a review from deepgoel17 December 11, 2024 17:56
@srinandan srinandan enabled auto-merge December 11, 2024 17:57
@srinandan srinandan disabled auto-merge December 11, 2024 17:57
@srinandan srinandan added the enhancement New feature or request label Jan 14, 2025
@srinandan srinandan enabled auto-merge January 15, 2025 05:53
@ssvaidyanathan ssvaidyanathan merged commit 8608d73 into main Jan 21, 2025
4 checks passed
@ssvaidyanathan ssvaidyanathan deleted the testcases branch January 21, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Enable the integrationcli to download unit test
3 participants