@empiricalrun/test-gen 0.20.0 → 0.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.20.2
4
+
5
+ ### Patch Changes
6
+
7
+ - a1bdd4c: fix: missing messages in dashboard while creating test
8
+ - Updated dependencies [a1bdd4c]
9
+ - @empiricalrun/reporter@0.13.1
10
+
11
+ ## 0.20.1
12
+
13
+ ### Patch Changes
14
+
15
+ - 6099fbe: fix: add a unit test for uploading test result and video
16
+ - Updated dependencies [1647fbe]
17
+ - @empiricalrun/reporter@0.13.0
18
+
3
19
  ## 0.20.0
4
20
 
5
21
  ### Minor Changes
package/dist/bin/index.js CHANGED
@@ -44,7 +44,12 @@ async function runAgent(sourceFile, testGenConfig) {
44
44
  process.exit(1);
45
45
  }
46
46
  const { sourceFile, testGenConfig } = await (0, utils_2.parseCliArgs)();
47
- (0, reporter_1.setReporterConfig)(testGenConfig?.options?.metadata);
47
+ (0, reporter_1.setReporterConfig)({
48
+ testCaseName: testGenConfig.testCase.name,
49
+ testGroup: testGenConfig.testCase.group,
50
+ projectRepoName: testGenConfig.options?.metadata.projectRepoName,
51
+ testSessionId: testGenConfig.options?.metadata.testSessionId,
52
+ });
48
53
  await runAgent(sourceFile, testGenConfig);
49
54
  // TODO: move these reporters to a better lifecycle
50
55
  await (0, ci_1.reportOnCI)(testGenConfig.testCase);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bin/utils/scenarios/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAwB,MAAM,gBAAgB,CAAC;AASrE,iBAAe,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAY5E;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bin/utils/scenarios/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAwB,MAAM,gBAAgB,CAAC;AASrE,iBAAe,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAa5E;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -10,6 +10,7 @@ async function loadTestConfigs(scenariosPath) {
10
10
  testCase: {
11
11
  name: config.name,
12
12
  steps: config.steps.filter((s) => !!s),
13
+ group: config.group,
13
14
  },
14
15
  options: config.options,
15
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAWlC,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,iBAiBnE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAWlC,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,iBAsBnE"}
package/dist/index.js CHANGED
@@ -16,7 +16,12 @@ async function createTest(task, page, test) {
16
16
  const port = process.env.APP_PORT || 3030;
17
17
  const testConfigArg = process.env.TEST_GEN_TOKEN;
18
18
  const { testGenConfig } = await (0, utils_1.parseCliArgs)(testConfigArg);
19
- (0, reporter_1.setReporterConfig)(testGenConfig.options?.metadata);
19
+ (0, reporter_1.setReporterConfig)({
20
+ testCaseName: testGenConfig.testCase.name,
21
+ testGroup: testGenConfig.testCase.group,
22
+ projectRepoName: testGenConfig.options?.metadata.projectRepoName,
23
+ testSessionId: testGenConfig.options?.metadata.testSessionId,
24
+ });
20
25
  const fileService = new client_1.default(Number(port));
21
26
  test.setTimeout(900000);
22
27
  const code = await (0, browsing_1.browsingAgent)(task, page, {
@@ -1,4 +1,10 @@
1
1
  import { Reporter } from "@empiricalrun/reporter";
2
+ type ReporterConfigType = {
3
+ testSessionId: number;
4
+ projectRepoName: string;
5
+ testCaseName: string;
6
+ testGroup: string;
7
+ };
2
8
  export declare function getReporter(): Reporter | undefined;
3
9
  /**
4
10
  * function will upload videos and json summary of test results to r2 and report them to reporter.
@@ -14,5 +20,6 @@ export declare function reportTestGenVideos({ projectRepoName, testName, }: {
14
20
  projectRepoName: string;
15
21
  testName: string;
16
22
  }): Promise<void>;
17
- export declare function setReporterConfig(config: any): void;
23
+ export declare function setReporterConfig(config: ReporterConfigType): void;
24
+ export {};
18
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAW5E,wBAAgB,WAAW,IAAI,QAAQ,GAAG,SAAS,CAUlD;AAED;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,eAAe,EACf,QAAQ,GACT,EAAE;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB,iBA6BA;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAGnD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAQ5E,KAAK,kBAAkB,GAAG;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAKF,wBAAgB,WAAW,IAAI,QAAQ,GAAG,SAAS,CAUlD;AAED;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,eAAe,EACf,QAAQ,GACT,EAAE;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB,iBA6BA;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAGlE"}
@@ -26,6 +26,7 @@ export type TestGenConfig = {
26
26
  export type TestCase = {
27
27
  name: string;
28
28
  steps: string[];
29
+ group: string;
29
30
  };
30
31
  export type PlaywrightActionGenerator = (page: Page) => Action;
31
32
  export type ActionSchema = OpenAI.Chat.Completions.ChatCompletionTool;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,QAAQ,CAAC;IAChB,aAAa,EAAE,WAAW,CAAC;IAC3B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,QAAQ,EAAE;QACR,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,aAAa,GAAG,YAAY,CAAC;KAC3C,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAA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AClC,QAAQ,EAAE;QACR,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,aAAa,GAAG,YAAY,CAAC;KAC3C,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;AAE/D,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC;AAEtE,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IAC5E,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;CAC/E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.20.0",
3
+ "version": "0.20.2",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -41,7 +41,7 @@
41
41
  "tsx": "^4.16.2",
42
42
  "typescript": "^5.3.3",
43
43
  "@empiricalrun/llm": "^0.4.1",
44
- "@empiricalrun/reporter": "^0.12.3"
44
+ "@empiricalrun/reporter": "^0.13.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/detect-port": "^1.3.5",