(kubernetes上的zalenium)有时只有第一个测试套件才能连续完成

时间:2019-11-01 15:39:43

标签: zalenium

在kubernetes上: 我运行我的测试套件java。 第一个测试套件有时会连续失败,但第二个测试套件每次都会失败。 测试成功时,我有日志org.openqa.selenium.remote.ProtocolHandshake createSession,但失败时却没有此日志。

我用

启动zalenium
default parameters

DESIRED_CONTAINERS : 1
MAX_TEST_SESSIONS : 10
other default parameters

DESIRED_CONTAINERS : 1

DESIRED_CONTAINERS : 2

我总是有相同的结果。 你有什么解释吗?

要复制:

ChromeOptions capabilities = new ChromeOptions();
capabilities.setExperimentalOption("w3c", false);
capabilities.setCapability("name", VIDEO_FILE_NAME);
driver = new RemoteWebDriver(new URL(REMOTE_URL), capabilities);

FirefoxOptions capFF = new FirefoxOptions();
capFF.setCapability("name", VIDEO_FILE_NAME);
driver = new RemoteWebDriver(new URL(REMOTE_URL), capFF);

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: pod
  name: pod
  namespace: test-ns
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pod
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: pod
    spec:
      serviceAccountName: test-sa
      containers:
        - image: dosel/zalenium
          imagePullPolicy: IfNotPresent
          name: pod
          securityContext:
            privileged: true
          env:
            - name: DESIRED_CONTAINERS
              value: "1"
          readinessProbe:
            httpGet:
              port: 4444
              path: /status
          ports:
            - containerPort: 4444
              hostPort: 4444
              protocol: TCP
              name: gate
          volumeMounts:
            - mountPath: /var/run/docker.sock
              name: docker-sock
            - mountPath: /home/seluser/videos
              name: video
          args:
            - start
      initContainers:
        - name: video-pvc-init
          image: busybox
          command: ["/bin/chmod","-R","777", "/home/seluser/videos"]
          volumeMounts:
            - mountPath: /home/seluser/videos
              name: video
      volumes:
        - hostPath:
            path: /var/run/docker.sock
          name: docker-sock
        - persistentVolumeClaim:
            claimName: video-pvc
          name: video

MAX_DOCKER_SELENIUM_CONTAINERS

的含义是什么

谢谢

0 个答案:

没有答案