GithubHelp home page GithubHelp logo

nanlabs / automation-seed Goto Github PK

View Code? Open in Web Editor NEW
19.0 16.0 3.0 4.6 MB

Automation Seed is a e2e automation framework built on top of WebdriverIO v7 and Selenium that uses Selenoid for execution

Home Page: https://nanlabs.github.io/automation-seed/

License: MIT License

TypeScript 57.50% Shell 37.47% JavaScript 5.02%
automation selenium wdio webdriverio webdriverio-framework selenoid typescript hacktoberfest

automation-seed's People

Contributors

arsentau avatar dependabot[bot] avatar jesinnott avatar matiasalvarez87 avatar sudojarvis avatar ulises-jeremias avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

automation-seed's Issues

getting started on Windows 10 is it supported ? npm ERR! notsup Unsupported platform for [email protected]:

Describe the issue

I am having issues getting yarn test to run.
I probably don't have all the dependencies ?
505 5 $ yarn test:local
yarn run v1.22.19
error [email protected]: The platform "win32" is incompatible with this module.
error Commands cannot run with an incompatible environment.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
515 15 $ fnm --version
fnm 1.35.1

504 4 $ npm --version
10.2.0

505 5 $ node --version
v18.17.1

506 6 $ yarn --version
1.22.19

additional observations:
/c/repo/automation_seed_webdriverIO___main__ (main)
516 16 $ npm install
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"linux,darwin","cpu":"x64,arm64"} (current: {"os":"win32
","cpu":"x64"})
npm ERR! notsup Valid os: linux,darwin
npm ERR! notsup Actual os: win32
npm ERR! notsup Valid cpu: x64,arm64
npm ERR! notsup Actual cpu: x64

npm ERR! A complete log of this run can be found in: C:\Users\kmartin\AppData\Local\npm-cache_logs\2023-10-18T23_03_44_742Z-debug-0.
log

Links

README.md ??

feature: Parallel Job execution using batches - Step 1

Blocked by: #4

Place a file at bin/suite-spec-paths.ts with the following content:

import glob from 'glob';
import { config } from '../config/wdio.suites.conf';

export const getSuiteSpecFiles = (
  globs: string | string[],
): string[] => {
  const files = Array.isArray(globs) ? globs : [globs];
  const specs = files.reduce((acc, file) => [...acc, ...glob.sync(file)], [] as string[]);
  return specs;
};

const suiteName = process.argv[2];

if (!suiteName) {
  process.exit(0);
}

if (!config.suites) {
  process.exit(0);
}

const suite = config.suites[suiteName];

if (!suite) {
  process.exit(0);
}

const suiteChunk = getSuiteSpecFiles(suite);

for (const spec of suiteChunk) {
  console.log(spec);
}

and add a script in the package json as follows:

"suite:files": "ts-node ./bin/suite-spec-paths.ts"

Switch to super-linter for CI Linting using GitHub Actions

Describe the feature

I propose switching our CI linting setup, which includes shellcheck, markdownlint, eslint, and others, to use super-linter exclusively for GitHub Actions. super-linter is a comprehensive and centralized linter that supports multiple languages, providing a unified linting experience.

Use Case

There are some benefits of super-linter:

  • Unified Linting: super-linter supports a wide range of languages and linters, providing a unified linting solution for our GitHub Actions workflow.

  • Easy Configuration: Simplifies configuration by having a single .github/linters configuration file.

  • Consistent Output: Standardizes the output format for linting results across different languages and linters.

  • Extensibility: Supports adding or customizing linters easily, making it adaptable to our specific requirements.

Proposed Solution

  1. Configure super-linter:

    • Create or update the .github/workflows configuration file to specify the linters and configurations needed.
  2. GitHub Actions Workflows:

    • Update the GitHub Actions workflow files to use super-linter for linting instead of the actual implementation
  3. Testing:

    • Thoroughly test the linting process with super-linter in the GitHub Actions workflow to ensure it covers all relevant languages and provides accurate results. You can test this by submitting a PR

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Version used

latest

Environment details (OS name and version, etc.)

any

feature: Parallel Job execution using batches - Step 2

Blocked by: #5

Update the suite execution in the reusable workflow to support multiple splits using the following code as reference:

- name: Execute test Suite
  run: |
    SPEC_FILES=$(yarn --silent suite:files ${{ inputs.suite }} | sort | awk "NR % $CI_TOTAL_JOBS == $CI_JOB_INDEX")
    echo "Number of specs to be executed: $(echo $SPEC_FILES | wc -w)"
    [[ -z "$SPEC_FILES" ]] && exit 0
    echo "Running specs: $SPEC_FILES"
    echo $SPEC_FILES | xargs yarn test:remote --spec
  if: ${{ inputs.suite != '' }}
  env:
    OUTPUT_DIR: '../../logs'
    WEBDRIVER_LOGLEVEL: ${{ inputs.log_level }}
    BROWSER_VISIBLE: ${{ inputs.browser_visible }}
    ENABLE_VIDEO: ${{ inputs.enable_video }}
    MAX_INSTANCES: ${{ inputs.max_instances }}
    CHROME: ${{ inputs.chrome_instances }}
    FIREFOX: ${{ inputs.firefox_instances }}
    WEBDRIVER_SPEC_FILE_RETRIES: 1
    CI_JOB_INDEX: ${{ inputs.spec_ci_index }}
    CI_TOTAL_JOBS: ${{ inputs.spec_ci_total }}

feature: Generic workflow call for automation

We have different workflows that are doing exactly the same. That is why we need to create a separate action and call it on each existing workflow.

  • Create a workflow at .github/workflows/automation-call.yml with the workflow_call trigger

The new workflow should have the following header:

permissions:
  contents: write

on:
  # This will allow us to reuse this workflow from other repos
  workflow_call:
    inputs:
      ref:
        description: Specifies from which ref to execute the automation.
        required: false
        type: string
        default: ""

      log_level:
        description: Specifies the log level
        required: true
        type: string
        default: 'info'

      suite:
        description: Suite to be executed
        default: ''
        type: string
        required: false

      spec:
        description: Spec to be executed. (Won't be used if suite is specified)
        default: ''
        type: string
        required: false

      spec_ci_index:
        description: Specifies the index of the spec in the CI environment
        default: 0
        type: number
        required: false

      spec_ci_total:
        description: Specifies the total number of specs in the CI environment
        default: 1
        type: number
        required: false

      max_instances:
        description: Maximum number of instances to be executed
        default: ''
        type: string
        required: false

      chrome_instances:
        description: Amount of Chrome Instances to be used. Won't use Chrome when its value is a blank string
        default: '1'
        type: string
        required: false

      firefox_instances:
        description: Amount of Firefox Instances to be used. Won't use Firefox when its value is a blank string
        default: ''
        type: string
        required: false

      browser_visible:
        description: Specifies whether the browser is visible on the Remote Dashboard. If false, the browsers will run in headless mode.
        type: string
        default: 'true'
        required: false

      enable_video:
        description: Specifies whether browser is recorded or not. Will be disabled if the browsers run in headless mode.
        type: string
        default: 'true'
        required: false

      update_report:
        description: Specifies whether the report is updated or not.
        type: string
        default: 'false'
        required: false

on windows 10 cannot override the already packaged chromedriver

Describe the issue

installing these as packages works around the issue but shouldn't paths to the browser driver successfully override the current project installed version ?

Using a project .npmrc file with chromedriver_filepath=/path/to/ChromeDriver.exe

Is that expected to override the current chrome driver in node modules ?
I have created a sh that appends it in path and added it to project .npmrc with no luck preventing it from picking up chromedriver version .114

per the chromedriver README.md node_modules\chromedriver\README.md
executing a npm install chromedriver got me to a different issue that I worked around by doing a new yarn for the installation

Links

node_modules\chromedriver\README.md

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.