-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adding Artillery and K6 triggers (#5)
- Loading branch information
Showing
27 changed files
with
390 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
web/src/components/RunDetailAutomateMethods/methods/Artillery/Artillery.styled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {Typography} from 'antd'; | ||
import styled from 'styled-components'; | ||
|
||
export const Title = styled(Typography.Title).attrs({ | ||
level: 3, | ||
})` | ||
&& { | ||
font-size: ${({theme}) => theme.size.md}; | ||
font-weight: 600; | ||
margin-bottom: 16px; | ||
} | ||
`; | ||
|
||
export const TitleContainer = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
`; | ||
|
||
export const Container = styled.div` | ||
margin: 16px 0; | ||
`; |
44 changes: 44 additions & 0 deletions
44
web/src/components/RunDetailAutomateMethods/methods/Artillery/Artillery.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import {ArtilleryCodeSnippet} from 'constants/Automate.constants'; | ||
import {Typography} from 'antd'; | ||
import {ReadOutlined} from '@ant-design/icons'; | ||
import {FramedCodeBlock} from 'components/CodeBlock'; | ||
import Test from 'models/Test.model'; | ||
import * as S from './Artillery.styled'; | ||
import {IMethodChildrenProps} from '../../RunDetailAutomateMethods'; | ||
|
||
interface IProps extends IMethodChildrenProps { | ||
test: Test; | ||
} | ||
|
||
const ARTILLERY_DOCS = 'https://docs.tracetest.io/tools-and-integrations/artillery-plugin'; | ||
|
||
const Artillery = ({test}: IProps) => ( | ||
<S.Container> | ||
<S.TitleContainer> | ||
<S.Title>Artillery Integration</S.Title> | ||
<a href={ARTILLERY_DOCS} target="_blank"> | ||
<ReadOutlined /> | ||
</a> | ||
</S.TitleContainer> | ||
<Typography.Paragraph> | ||
The code snippet below enables you to run this test via a Artillery run. | ||
</Typography.Paragraph> | ||
<FramedCodeBlock | ||
title="Install:" | ||
language="bash" | ||
value="npm i -g artillery-plugin-tracetest" | ||
minHeight="50px" | ||
maxHeight="50px" | ||
/> | ||
<br /> | ||
<FramedCodeBlock | ||
title="Artillery Test Script:" | ||
minHeight="300px" | ||
maxHeight="300px" | ||
language="yaml" | ||
value={ArtilleryCodeSnippet(test.id)} | ||
/> | ||
</S.Container> | ||
); | ||
|
||
export default Artillery; |
2 changes: 2 additions & 0 deletions
2
web/src/components/RunDetailAutomateMethods/methods/Artillery/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// eslint-disable-next-line no-restricted-exports | ||
export {default} from './Artillery'; |
22 changes: 22 additions & 0 deletions
22
...src/components/RunDetailAutomateMethods/methods/ArtilleryEngine/ArtilleryEngine.styled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {Typography} from 'antd'; | ||
import styled from 'styled-components'; | ||
|
||
export const Title = styled(Typography.Title).attrs({ | ||
level: 3, | ||
})` | ||
&& { | ||
font-size: ${({theme}) => theme.size.md}; | ||
font-weight: 600; | ||
margin-bottom: 16px; | ||
} | ||
`; | ||
|
||
export const TitleContainer = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
`; | ||
|
||
export const Container = styled.div` | ||
margin: 16px 0; | ||
`; |
42 changes: 42 additions & 0 deletions
42
web/src/components/RunDetailAutomateMethods/methods/ArtilleryEngine/ArtilleryEngine.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import {ArtilleryEngineCodeSnippet} from 'constants/Automate.constants'; | ||
import {ReadOutlined} from '@ant-design/icons'; | ||
import {Typography} from 'antd'; | ||
import {FramedCodeBlock} from 'components/CodeBlock'; | ||
import Test from 'models/Test.model'; | ||
import * as S from './ArtilleryEngine.styled'; | ||
import {IMethodChildrenProps} from '../../RunDetailAutomateMethods'; | ||
|
||
interface IProps extends IMethodChildrenProps { | ||
test: Test; | ||
} | ||
|
||
const ARTILLERY_DOCS = 'https://docs.tracetest.io/tools-and-integrations/artillery-engine'; | ||
|
||
const ArtilleryEngine = ({test}: IProps) => ( | ||
<S.Container> | ||
<S.TitleContainer> | ||
<S.Title>Artillery Engine Integration</S.Title> | ||
<a href={ARTILLERY_DOCS} target="_blank"> | ||
<ReadOutlined /> | ||
</a> | ||
</S.TitleContainer> | ||
<Typography.Paragraph> | ||
The code snippet below enables you to run this test via a Artillery run. | ||
</Typography.Paragraph> | ||
<FramedCodeBlock | ||
title="Install:" | ||
language="bash" | ||
value="npm i -g artillery-engine-tracetest" | ||
minHeight="50px" | ||
maxHeight="50px" | ||
/> | ||
<br /> | ||
<FramedCodeBlock | ||
title="Artillery Test Script:" | ||
language="yaml" | ||
value={ArtilleryEngineCodeSnippet(test.id)} | ||
/> | ||
</S.Container> | ||
); | ||
|
||
export default ArtilleryEngine; |
2 changes: 2 additions & 0 deletions
2
web/src/components/RunDetailAutomateMethods/methods/ArtilleryEngine/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// eslint-disable-next-line no-restricted-exports | ||
export {default} from './ArtilleryEngine'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
web/src/components/RunDetailAutomateMethods/methods/K6/K6.styled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {Typography} from 'antd'; | ||
import styled from 'styled-components'; | ||
|
||
export const Title = styled(Typography.Title).attrs({ | ||
level: 3, | ||
})` | ||
&& { | ||
font-size: ${({theme}) => theme.size.md}; | ||
font-weight: 600; | ||
margin-bottom: 16px; | ||
} | ||
`; | ||
|
||
export const TitleContainer = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
`; | ||
|
||
export const Container = styled.div` | ||
margin: 16px 0; | ||
`; |
36 changes: 36 additions & 0 deletions
36
web/src/components/RunDetailAutomateMethods/methods/K6/K6.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {K6CodeSnippet} from 'constants/Automate.constants'; | ||
import {ReadOutlined} from '@ant-design/icons'; | ||
import {Typography} from 'antd'; | ||
import {FramedCodeBlock} from 'components/CodeBlock'; | ||
import * as S from './K6.styled'; | ||
|
||
const K6_DOCS = 'https://docs.tracetest.io/tools-and-integrations/k6'; | ||
|
||
const K6 = () => ( | ||
<S.Container> | ||
<S.TitleContainer> | ||
<S.Title>K6 Integration</S.Title> | ||
<a href={K6_DOCS} target="_blank"> | ||
<ReadOutlined /> | ||
</a> | ||
</S.TitleContainer> | ||
<Typography.Paragraph>The code snippet below enables you to run this test via a K6 run.</Typography.Paragraph> | ||
<FramedCodeBlock | ||
title="Bundle:" | ||
language="bash" | ||
value="xk6 build v0.49.0 --with github.com/kubeshop/xk6-tracetest" | ||
minHeight="50px" | ||
maxHeight="50px" | ||
/> | ||
<br /> | ||
<FramedCodeBlock | ||
title="K6 Test Script:" | ||
minHeight="50px" | ||
maxHeight="50px" | ||
language="bash" | ||
value={K6CodeSnippet()} | ||
/> | ||
</S.Container> | ||
); | ||
|
||
export default K6; |
2 changes: 2 additions & 0 deletions
2
web/src/components/RunDetailAutomateMethods/methods/K6/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// eslint-disable-next-line no-restricted-exports | ||
export {default} from './K6'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.